/**
 *
 */
import OpenApi;
import OpenApi.OpenApiUtil;

extends OpenApi;


init(config: OpenApiUtil.Config){
  super(config);
  @signatureAlgorithm = 'v2';
  @endpointRule = 'regional';
  
  checkConfig(config);
  @endpoint = getEndpoint('vs', @regionId, @endpointRule, @network, @suffix, @endpointMap, @endpoint);
}

function getEndpoint(productId: string, regionId: string, endpointRule: string, network: string, suffix: string, endpointMap: map[string]string, endpoint: string) throws: string{
  if (!$isNull(endpoint)) {
    return endpoint;
  }
  
  if (!$isNull(endpointMap) && !$isNull(endpointMap[regionId])) {
    return endpointMap[regionId];
  }
  return OpenApiUtil.getEndpointRules(productId, regionId, endpointRule, network, suffix);
}

model AddVsPullStreamInfoConfigRequest {
  always?: string(name='Always'),
  appName?: string(name='AppName', description='This parameter is required.', example='xxxApp'),
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.com'),
  endTime?: string(name='EndTime', example='2017-08-28T09:30:30Z'),
  ownerId?: long(name='OwnerId'),
  sourceUrl?: string(name='SourceUrl', description='This parameter is required.', example='up.******.com.cn'),
  startTime?: string(name='StartTime', example='2017-08-28T07:30:30Z'),
  streamName?: string(name='StreamName', description='This parameter is required.', example='xxxStream'),
}

model AddVsPullStreamInfoConfigResponseBody = {
  requestId?: string(name='RequestId', example='3CB843A9-DD34-4881-B8D6-B0D539D111E4'),
}

model AddVsPullStreamInfoConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: AddVsPullStreamInfoConfigResponseBody(name='body'),
}

/**
 * @param request AddVsPullStreamInfoConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return AddVsPullStreamInfoConfigResponse
 */
async function addVsPullStreamInfoConfigWithOptions(request: AddVsPullStreamInfoConfigRequest, runtime: $RuntimeOptions): AddVsPullStreamInfoConfigResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.always)) {
    query['Always'] = request.always;
  }
  if (!$isNull(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.sourceUrl)) {
    query['SourceUrl'] = request.sourceUrl;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!$isNull(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'AddVsPullStreamInfoConfig',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request AddVsPullStreamInfoConfigRequest
 * @return AddVsPullStreamInfoConfigResponse
 */
async function addVsPullStreamInfoConfig(request: AddVsPullStreamInfoConfigRequest): AddVsPullStreamInfoConfigResponse {
  var runtime = new $RuntimeOptions{};
  return addVsPullStreamInfoConfigWithOptions(request, runtime);
}

model BatchBindDirectoriesRequest {
  deviceId?: string(name='DeviceId', description='This parameter is required.', example='348*****380-cn-qingdao'),
  directoryId?: string(name='DirectoryId', description='This parameter is required.', example='399*****488-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model BatchBindDirectoriesResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  results?: [ 
    {
      deviceId?: string(name='DeviceId', example='348*****380-cn-qingdao'),
      directoryId?: string(name='DirectoryId', example='399*****488-cn-qingdao'),
      error?: string(name='Error', example='An error occurred while processing your request.'),
    }
  ](name='Results'),
}

model BatchBindDirectoriesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchBindDirectoriesResponseBody(name='body'),
}

/**
 * @param request BatchBindDirectoriesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchBindDirectoriesResponse
 */
async function batchBindDirectoriesWithOptions(request: BatchBindDirectoriesRequest, runtime: $RuntimeOptions): BatchBindDirectoriesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.deviceId)) {
    query['DeviceId'] = request.deviceId;
  }
  if (!$isNull(request.directoryId)) {
    query['DirectoryId'] = request.directoryId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchBindDirectories',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchBindDirectoriesRequest
 * @return BatchBindDirectoriesResponse
 */
async function batchBindDirectories(request: BatchBindDirectoriesRequest): BatchBindDirectoriesResponse {
  var runtime = new $RuntimeOptions{};
  return batchBindDirectoriesWithOptions(request, runtime);
}

model BatchBindParentPlatformDevicesRequest {
  deviceId?: string(name='DeviceId', description='This parameter is required.', example='348*****380-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  parentPlatformId?: string(name='ParentPlatformId', description='This parameter is required.', example='361*****212-cn-qingdao'),
}

model BatchBindParentPlatformDevicesResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  results?: [ 
    {
      deviceId?: string(name='DeviceId', example='348*****380-cn-qingdao'),
      error?: string(name='Error', example='some error'),
      parentPlatformId?: string(name='ParentPlatformId', example='361*****212-cn-qingdao'),
    }
  ](name='Results'),
}

model BatchBindParentPlatformDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchBindParentPlatformDevicesResponseBody(name='body'),
}

/**
 * @param request BatchBindParentPlatformDevicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchBindParentPlatformDevicesResponse
 */
async function batchBindParentPlatformDevicesWithOptions(request: BatchBindParentPlatformDevicesRequest, runtime: $RuntimeOptions): BatchBindParentPlatformDevicesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.deviceId)) {
    query['DeviceId'] = request.deviceId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.parentPlatformId)) {
    query['ParentPlatformId'] = request.parentPlatformId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchBindParentPlatformDevices',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchBindParentPlatformDevicesRequest
 * @return BatchBindParentPlatformDevicesResponse
 */
async function batchBindParentPlatformDevices(request: BatchBindParentPlatformDevicesRequest): BatchBindParentPlatformDevicesResponse {
  var runtime = new $RuntimeOptions{};
  return batchBindParentPlatformDevicesWithOptions(request, runtime);
}

model BatchBindPurchasedDevicesRequest {
  deviceId?: string(name='DeviceId', description='This parameter is required.', example='348*****380-cn-qingdao'),
  groupId?: string(name='GroupId', description='This parameter is required.', example='348*****174-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  region?: string(name='Region', description='This parameter is required.', example='cn-qingdao'),
}

model BatchBindPurchasedDevicesResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  results?: [ 
    {
      deviceId?: string(name='DeviceId', example='348*****380-cn-qingdao'),
      error?: string(name='Error', example='some error'),
      groupId?: string(name='GroupId', example='238*****380-cn-qingdao'),
      region?: string(name='Region', example='cn-qingdao'),
    }
  ](name='Results'),
}

model BatchBindPurchasedDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchBindPurchasedDevicesResponseBody(name='body'),
}

/**
 * @param request BatchBindPurchasedDevicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchBindPurchasedDevicesResponse
 */
async function batchBindPurchasedDevicesWithOptions(request: BatchBindPurchasedDevicesRequest, runtime: $RuntimeOptions): BatchBindPurchasedDevicesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.deviceId)) {
    query['DeviceId'] = request.deviceId;
  }
  if (!$isNull(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.region)) {
    query['Region'] = request.region;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchBindPurchasedDevices',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchBindPurchasedDevicesRequest
 * @return BatchBindPurchasedDevicesResponse
 */
async function batchBindPurchasedDevices(request: BatchBindPurchasedDevicesRequest): BatchBindPurchasedDevicesResponse {
  var runtime = new $RuntimeOptions{};
  return batchBindPurchasedDevicesWithOptions(request, runtime);
}

model BatchBindTemplateRequest {
  applyAll?: boolean(name='ApplyAll', example='false'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='323*****994-cn-qingdao'),
  instanceType?: string(name='InstanceType', description='This parameter is required.', example='group'),
  ownerId?: long(name='OwnerId'),
  replace?: boolean(name='Replace', example='false'),
  templateId?: string(name='TemplateId', description='This parameter is required.', example='323*****998-cn-qingdao'),
}

model BatchBindTemplateResponseBody = {
  bindings?: [ 
    {
      error?: string(name='Error', example='some error'),
      instanceId?: string(name='InstanceId', example='323*****994-cn-qingdao'),
      instanceType?: string(name='InstanceType', example='group'),
      templateId?: string(name='TemplateId', example='323*****998-cn-qingdao'),
    }
  ](name='Bindings'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model BatchBindTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchBindTemplateResponseBody(name='body'),
}

/**
 * @param request BatchBindTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchBindTemplateResponse
 */
async function batchBindTemplateWithOptions(request: BatchBindTemplateRequest, runtime: $RuntimeOptions): BatchBindTemplateResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.applyAll)) {
    query['ApplyAll'] = request.applyAll;
  }
  if (!$isNull(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.instanceType)) {
    query['InstanceType'] = request.instanceType;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.replace)) {
    query['Replace'] = request.replace;
  }
  if (!$isNull(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchBindTemplate',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchBindTemplateRequest
 * @return BatchBindTemplateResponse
 */
async function batchBindTemplate(request: BatchBindTemplateRequest): BatchBindTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return batchBindTemplateWithOptions(request, runtime);
}

model BatchBindTemplatesRequest {
  applyAll?: boolean(name='ApplyAll', example='false'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='323*****994-cn-qingdao'),
  instanceType?: string(name='InstanceType', description='This parameter is required.', example='stream'),
  ownerId?: long(name='OwnerId'),
  replace?: boolean(name='Replace', example='true'),
  templateId?: string(name='TemplateId', description='This parameter is required.', example='323*****998-cn-qingdao'),
  templateType?: string(name='TemplateType', example='timeshift'),
}

model BatchBindTemplatesResponseBody = {
  requestId?: string(name='RequestId', example='20D0DFCE-5DB7-5D83-BD82-8482F2327636'),
  results?: [ 
    {
      error?: string(name='Error', example='some error'),
      instanceId?: string(name='InstanceId', example='323*****994-cn-qingdao'),
      instanceType?: string(name='InstanceType', example='group'),
      templateId?: string(name='TemplateId', example='323*****998-cn-qingdao'),
    }
  ](name='Results'),
}

model BatchBindTemplatesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchBindTemplatesResponseBody(name='body'),
}

/**
 * @param request BatchBindTemplatesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchBindTemplatesResponse
 */
async function batchBindTemplatesWithOptions(request: BatchBindTemplatesRequest, runtime: $RuntimeOptions): BatchBindTemplatesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.applyAll)) {
    query['ApplyAll'] = request.applyAll;
  }
  if (!$isNull(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.instanceType)) {
    query['InstanceType'] = request.instanceType;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.replace)) {
    query['Replace'] = request.replace;
  }
  if (!$isNull(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!$isNull(request.templateType)) {
    query['TemplateType'] = request.templateType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchBindTemplates',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchBindTemplatesRequest
 * @return BatchBindTemplatesResponse
 */
async function batchBindTemplates(request: BatchBindTemplatesRequest): BatchBindTemplatesResponse {
  var runtime = new $RuntimeOptions{};
  return batchBindTemplatesWithOptions(request, runtime);
}

model BatchDeleteDevicesRequest {
  id?: string(name='Id', description='This parameter is required.', example='32388****39092996'),
  ownerId?: long(name='OwnerId'),
}

model BatchDeleteDevicesResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  results?: [ 
    {
      error?: string(name='Error', example='Device not found'),
      id?: string(name='Id', example='323884****9092996'),
    }
  ](name='Results'),
}

model BatchDeleteDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchDeleteDevicesResponseBody(name='body'),
}

/**
 * @param request BatchDeleteDevicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchDeleteDevicesResponse
 */
async function batchDeleteDevicesWithOptions(request: BatchDeleteDevicesRequest, runtime: $RuntimeOptions): BatchDeleteDevicesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchDeleteDevices',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchDeleteDevicesRequest
 * @return BatchDeleteDevicesResponse
 */
async function batchDeleteDevices(request: BatchDeleteDevicesRequest): BatchDeleteDevicesResponse {
  var runtime = new $RuntimeOptions{};
  return batchDeleteDevicesWithOptions(request, runtime);
}

model BatchDeleteVsDomainConfigsRequest {
  domainNames?: string(name='DomainNames', description='This parameter is required.', example='example.aliyundoc.com'),
  functionNames?: string(name='FunctionNames', description='This parameter is required.', example='https_force'),
  ownerId?: long(name='OwnerId'),
}

model BatchDeleteVsDomainConfigsResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model BatchDeleteVsDomainConfigsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchDeleteVsDomainConfigsResponseBody(name='body'),
}

/**
 * @param request BatchDeleteVsDomainConfigsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchDeleteVsDomainConfigsResponse
 */
async function batchDeleteVsDomainConfigsWithOptions(request: BatchDeleteVsDomainConfigsRequest, runtime: $RuntimeOptions): BatchDeleteVsDomainConfigsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainNames)) {
    query['DomainNames'] = request.domainNames;
  }
  if (!$isNull(request.functionNames)) {
    query['FunctionNames'] = request.functionNames;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchDeleteVsDomainConfigs',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchDeleteVsDomainConfigsRequest
 * @return BatchDeleteVsDomainConfigsResponse
 */
async function batchDeleteVsDomainConfigs(request: BatchDeleteVsDomainConfigsRequest): BatchDeleteVsDomainConfigsResponse {
  var runtime = new $RuntimeOptions{};
  return batchDeleteVsDomainConfigsWithOptions(request, runtime);
}

model BatchForbidVsStreamRequest {
  channel?: string(name='Channel', description='This parameter is required.', example='live/stream1,live/stream2'),
  controlStreamAction?: string(name='ControlStreamAction'),
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.com'),
  liveStreamType?: string(name='LiveStreamType', description='This parameter is required.', example='publisher'),
  oneshot?: string(name='Oneshot', example='yes'),
  ownerId?: long(name='OwnerId'),
  resumeTime?: string(name='ResumeTime', example='2015-12-01T17:37:00Z'),
}

model BatchForbidVsStreamResponseBody = {
  forbidResult?: {
    forbidResultInfo?: [ 
    {
      channels?: {
        channel?: [ string ](name='Channel')
      }(name='Channels'),
      count?: int32(name='Count', example='2'),
      detail?: string(name='Detail', example='ok'),
      result?: string(name='Result', example='success'),
    }
  ](name='ForbidResultInfo')
  }(name='ForbidResult'),
  requestId?: string(name='RequestId', example='B058D71B-76EA-5DF6-ACAF-A617C1E7937F'),
}

model BatchForbidVsStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchForbidVsStreamResponseBody(name='body'),
}

/**
 * @param request BatchForbidVsStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchForbidVsStreamResponse
 */
async function batchForbidVsStreamWithOptions(request: BatchForbidVsStreamRequest, runtime: $RuntimeOptions): BatchForbidVsStreamResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.channel)) {
    query['Channel'] = request.channel;
  }
  if (!$isNull(request.controlStreamAction)) {
    query['ControlStreamAction'] = request.controlStreamAction;
  }
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.liveStreamType)) {
    query['LiveStreamType'] = request.liveStreamType;
  }
  if (!$isNull(request.oneshot)) {
    query['Oneshot'] = request.oneshot;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.resumeTime)) {
    query['ResumeTime'] = request.resumeTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchForbidVsStream',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchForbidVsStreamRequest
 * @return BatchForbidVsStreamResponse
 */
async function batchForbidVsStream(request: BatchForbidVsStreamRequest): BatchForbidVsStreamResponse {
  var runtime = new $RuntimeOptions{};
  return batchForbidVsStreamWithOptions(request, runtime);
}

model BatchResumeVsStreamRequest {
  channel?: string(name='Channel', description='This parameter is required.', example='live/stream1'),
  controlStreamAction?: string(name='ControlStreamAction'),
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.com'),
  liveStreamType?: string(name='LiveStreamType', description='This parameter is required.', example='publisher'),
  ownerId?: long(name='OwnerId'),
}

model BatchResumeVsStreamResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  resumeResult?: {
    resumeResultInfo?: [ 
    {
      channels?: {
        channel?: [ string ](name='Channel')
      }(name='Channels'),
      count?: int32(name='Count', example='1'),
      detail?: string(name='Detail', example='ok'),
      result?: string(name='Result', example='success'),
    }
  ](name='ResumeResultInfo')
  }(name='ResumeResult'),
}

model BatchResumeVsStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchResumeVsStreamResponseBody(name='body'),
}

/**
 * @param request BatchResumeVsStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchResumeVsStreamResponse
 */
async function batchResumeVsStreamWithOptions(request: BatchResumeVsStreamRequest, runtime: $RuntimeOptions): BatchResumeVsStreamResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.channel)) {
    query['Channel'] = request.channel;
  }
  if (!$isNull(request.controlStreamAction)) {
    query['ControlStreamAction'] = request.controlStreamAction;
  }
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.liveStreamType)) {
    query['LiveStreamType'] = request.liveStreamType;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchResumeVsStream',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchResumeVsStreamRequest
 * @return BatchResumeVsStreamResponse
 */
async function batchResumeVsStream(request: BatchResumeVsStreamRequest): BatchResumeVsStreamResponse {
  var runtime = new $RuntimeOptions{};
  return batchResumeVsStreamWithOptions(request, runtime);
}

model BatchSetVsDomainConfigsRequest {
  domainNames?: string(name='DomainNames', description='This parameter is required.', example='example.aliyundoc.com'),
  functions?: string(name='Functions', description='This parameter is required.', example='[{“functionArgs”:[{“argName”:”domain_name”,”argValue”:”api.hellodtworld.com”}],”functionName”:”set_req_host_header”}]'),
  ownerId?: long(name='OwnerId'),
}

model BatchSetVsDomainConfigsResponseBody = {
  requestId?: string(name='RequestId', example='9BEC5E85-C76B-56EF-A922-860EFDB8B64B'),
}

model BatchSetVsDomainConfigsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchSetVsDomainConfigsResponseBody(name='body'),
}

/**
 * @param request BatchSetVsDomainConfigsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchSetVsDomainConfigsResponse
 */
async function batchSetVsDomainConfigsWithOptions(request: BatchSetVsDomainConfigsRequest, runtime: $RuntimeOptions): BatchSetVsDomainConfigsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainNames)) {
    query['DomainNames'] = request.domainNames;
  }
  if (!$isNull(request.functions)) {
    query['Functions'] = request.functions;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchSetVsDomainConfigs',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchSetVsDomainConfigsRequest
 * @return BatchSetVsDomainConfigsResponse
 */
async function batchSetVsDomainConfigs(request: BatchSetVsDomainConfigsRequest): BatchSetVsDomainConfigsResponse {
  var runtime = new $RuntimeOptions{};
  return batchSetVsDomainConfigsWithOptions(request, runtime);
}

model BatchStartDevicesRequest {
  id?: string(name='Id', description='This parameter is required.', example='32388487****92996-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model BatchStartDevicesResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  results?: [ 
    {
      id?: string(name='Id', example='32388487****92996-cn-qingdao'),
      streams?: [ 
        {
          error?: string(name='Error', example='Stream not found'),
          id?: string(name='Id', example='3238848****092997-cn-qingdao'),
          name?: string(name='Name', example='310101*****187542126'),
        }
      ](name='Streams'),
    }
  ](name='Results'),
}

model BatchStartDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchStartDevicesResponseBody(name='body'),
}

/**
 * @param request BatchStartDevicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchStartDevicesResponse
 */
async function batchStartDevicesWithOptions(request: BatchStartDevicesRequest, runtime: $RuntimeOptions): BatchStartDevicesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchStartDevices',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchStartDevicesRequest
 * @return BatchStartDevicesResponse
 */
async function batchStartDevices(request: BatchStartDevicesRequest): BatchStartDevicesResponse {
  var runtime = new $RuntimeOptions{};
  return batchStartDevicesWithOptions(request, runtime);
}

model BatchStartStreamsRequest {
  id?: string(name='Id', description='This parameter is required.', example='323*****997-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model BatchStartStreamsResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  results?: [ 
    {
      error?: string(name='Error', example='stream not found'),
      id?: string(name='Id', example='323*****997-cn-qingdao'),
      name?: string(name='Name', example='31000000*****0000002'),
    }
  ](name='Results'),
}

model BatchStartStreamsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchStartStreamsResponseBody(name='body'),
}

/**
 * @param request BatchStartStreamsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchStartStreamsResponse
 */
async function batchStartStreamsWithOptions(request: BatchStartStreamsRequest, runtime: $RuntimeOptions): BatchStartStreamsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchStartStreams',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchStartStreamsRequest
 * @return BatchStartStreamsResponse
 */
async function batchStartStreams(request: BatchStartStreamsRequest): BatchStartStreamsResponse {
  var runtime = new $RuntimeOptions{};
  return batchStartStreamsWithOptions(request, runtime);
}

model BatchStopDevicesRequest {
  id?: string(name='Id', description='This parameter is required.', example='32388487****92996'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime', example='2021-10-14T23:00:00Z'),
}

model BatchStopDevicesResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  results?: [ 
    {
      id?: string(name='Id', example='32388487****92996'),
      streams?: [ 
        {
          error?: string(name='Error', example='Stream not found'),
          id?: string(name='Id', example='323884****9092997'),
          name?: string(name='Name', example='32388*****39092997'),
        }
      ](name='Streams'),
    }
  ](name='Results'),
}

model BatchStopDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchStopDevicesResponseBody(name='body'),
}

/**
 * @param request BatchStopDevicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchStopDevicesResponse
 */
async function batchStopDevicesWithOptions(request: BatchStopDevicesRequest, runtime: $RuntimeOptions): BatchStopDevicesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchStopDevices',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchStopDevicesRequest
 * @return BatchStopDevicesResponse
 */
async function batchStopDevices(request: BatchStopDevicesRequest): BatchStopDevicesResponse {
  var runtime = new $RuntimeOptions{};
  return batchStopDevicesWithOptions(request, runtime);
}

model BatchStopStreamsRequest {
  id?: string(name='Id', description='This parameter is required.', example='323*****997-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime', example='2021-12-10T10:00:00Z'),
}

model BatchStopStreamsResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  results?: [ 
    {
      error?: string(name='Error', example='stream not found'),
      id?: string(name='Id', example='323*****997-cn-qingdao'),
      name?: string(name='Name', example='3100000*****00000002'),
    }
  ](name='Results'),
}

model BatchStopStreamsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchStopStreamsResponseBody(name='body'),
}

/**
 * @param request BatchStopStreamsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchStopStreamsResponse
 */
async function batchStopStreamsWithOptions(request: BatchStopStreamsRequest, runtime: $RuntimeOptions): BatchStopStreamsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchStopStreams',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchStopStreamsRequest
 * @return BatchStopStreamsResponse
 */
async function batchStopStreams(request: BatchStopStreamsRequest): BatchStopStreamsResponse {
  var runtime = new $RuntimeOptions{};
  return batchStopStreamsWithOptions(request, runtime);
}

model BatchUnbindDirectoriesRequest {
  deviceId?: string(name='DeviceId', description='This parameter is required.', example='348*****380-cn-qingdao'),
  directoryId?: string(name='DirectoryId', description='This parameter is required.', example='399*****488-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model BatchUnbindDirectoriesResponseBody = {
  requestId?: string(name='RequestId', example='64DB7F34-11A8-45DC-A421-40ACF446282C'),
  results?: [ 
    {
      deviceId?: string(name='DeviceId', example='348*****380-cn-qingdao'),
      directoryId?: string(name='DirectoryId', example='399*****488-cn-qingdao'),
      error?: string(name='Error', example='An error occurred while processing your request.'),
    }
  ](name='Results'),
}

model BatchUnbindDirectoriesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchUnbindDirectoriesResponseBody(name='body'),
}

/**
 * @param request BatchUnbindDirectoriesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchUnbindDirectoriesResponse
 */
async function batchUnbindDirectoriesWithOptions(request: BatchUnbindDirectoriesRequest, runtime: $RuntimeOptions): BatchUnbindDirectoriesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.deviceId)) {
    query['DeviceId'] = request.deviceId;
  }
  if (!$isNull(request.directoryId)) {
    query['DirectoryId'] = request.directoryId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchUnbindDirectories',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchUnbindDirectoriesRequest
 * @return BatchUnbindDirectoriesResponse
 */
async function batchUnbindDirectories(request: BatchUnbindDirectoriesRequest): BatchUnbindDirectoriesResponse {
  var runtime = new $RuntimeOptions{};
  return batchUnbindDirectoriesWithOptions(request, runtime);
}

model BatchUnbindParentPlatformDevicesRequest {
  deviceId?: string(name='DeviceId', description='This parameter is required.', example='348*****380-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  parentPlatformId?: string(name='ParentPlatformId', description='This parameter is required.', example='361*****212-cn-qingdao'),
}

model BatchUnbindParentPlatformDevicesResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  results?: [ 
    {
      deviceId?: string(name='DeviceId', example='348*****380-cn-qingdao'),
      error?: string(name='Error', example='some error'),
      parentPlatformId?: string(name='ParentPlatformId', example='361*****212-cn-qingdao'),
    }
  ](name='Results'),
}

model BatchUnbindParentPlatformDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchUnbindParentPlatformDevicesResponseBody(name='body'),
}

/**
 * @param request BatchUnbindParentPlatformDevicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchUnbindParentPlatformDevicesResponse
 */
async function batchUnbindParentPlatformDevicesWithOptions(request: BatchUnbindParentPlatformDevicesRequest, runtime: $RuntimeOptions): BatchUnbindParentPlatformDevicesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.deviceId)) {
    query['DeviceId'] = request.deviceId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.parentPlatformId)) {
    query['ParentPlatformId'] = request.parentPlatformId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchUnbindParentPlatformDevices',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchUnbindParentPlatformDevicesRequest
 * @return BatchUnbindParentPlatformDevicesResponse
 */
async function batchUnbindParentPlatformDevices(request: BatchUnbindParentPlatformDevicesRequest): BatchUnbindParentPlatformDevicesResponse {
  var runtime = new $RuntimeOptions{};
  return batchUnbindParentPlatformDevicesWithOptions(request, runtime);
}

model BatchUnbindPurchasedDevicesRequest {
  deviceId?: string(name='DeviceId', description='This parameter is required.', example='348*****380-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model BatchUnbindPurchasedDevicesResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  results?: [ 
    {
      deviceId?: string(name='DeviceId', example='348*****380-cn-qingdao'),
      error?: string(name='Error', example='some error'),
    }
  ](name='Results'),
}

model BatchUnbindPurchasedDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchUnbindPurchasedDevicesResponseBody(name='body'),
}

/**
 * @param request BatchUnbindPurchasedDevicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchUnbindPurchasedDevicesResponse
 */
async function batchUnbindPurchasedDevicesWithOptions(request: BatchUnbindPurchasedDevicesRequest, runtime: $RuntimeOptions): BatchUnbindPurchasedDevicesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.deviceId)) {
    query['DeviceId'] = request.deviceId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchUnbindPurchasedDevices',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchUnbindPurchasedDevicesRequest
 * @return BatchUnbindPurchasedDevicesResponse
 */
async function batchUnbindPurchasedDevices(request: BatchUnbindPurchasedDevicesRequest): BatchUnbindPurchasedDevicesResponse {
  var runtime = new $RuntimeOptions{};
  return batchUnbindPurchasedDevicesWithOptions(request, runtime);
}

model BatchUnbindTemplateRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='323*****994-cn-qingdao'),
  instanceType?: string(name='InstanceType', description='This parameter is required.', example='group'),
  ownerId?: long(name='OwnerId'),
  templateId?: string(name='TemplateId', example='323*****998-cn-qingdao'),
  templateType?: string(name='TemplateType', example='record'),
}

model BatchUnbindTemplateResponseBody = {
  bindings?: [ 
    {
      error?: string(name='Error', example='some error'),
      instanceId?: string(name='InstanceId', example='323*****994-cn-qingdao'),
      instanceType?: string(name='InstanceType', example='group'),
      templateId?: string(name='TemplateId', example='323*****998-cn-qingdao'),
    }
  ](name='Bindings'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model BatchUnbindTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchUnbindTemplateResponseBody(name='body'),
}

/**
 * @param request BatchUnbindTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchUnbindTemplateResponse
 */
async function batchUnbindTemplateWithOptions(request: BatchUnbindTemplateRequest, runtime: $RuntimeOptions): BatchUnbindTemplateResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.instanceType)) {
    query['InstanceType'] = request.instanceType;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!$isNull(request.templateType)) {
    query['TemplateType'] = request.templateType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchUnbindTemplate',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchUnbindTemplateRequest
 * @return BatchUnbindTemplateResponse
 */
async function batchUnbindTemplate(request: BatchUnbindTemplateRequest): BatchUnbindTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return batchUnbindTemplateWithOptions(request, runtime);
}

model BatchUnbindTemplatesRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='400941290881239938-cn-beijing'),
  instanceType?: string(name='InstanceType', description='This parameter is required.', example='stream'),
  ownerId?: long(name='OwnerId'),
  templateId?: string(name='TemplateId', example='323*****998-cn-qingdao'),
  templateType?: string(name='TemplateType', example='record'),
}

model BatchUnbindTemplatesResponseBody = {
  requestId?: string(name='RequestId', example='90B377DF-C874-5BBD-B957-42C4C06AFECE'),
  results?: [ 
    {
      error?: string(name='Error', example='some error'),
      instanceId?: string(name='InstanceId', example='323*****994-cn-qingdao'),
      instanceType?: string(name='InstanceType', example='group'),
      templateId?: string(name='TemplateId', example='323*****998-cn-qingdao'),
      templateType?: string(name='TemplateType', example='snapshot'),
    }
  ](name='Results'),
}

model BatchUnbindTemplatesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BatchUnbindTemplatesResponseBody(name='body'),
}

/**
 * @param request BatchUnbindTemplatesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BatchUnbindTemplatesResponse
 */
async function batchUnbindTemplatesWithOptions(request: BatchUnbindTemplatesRequest, runtime: $RuntimeOptions): BatchUnbindTemplatesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.instanceType)) {
    query['InstanceType'] = request.instanceType;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!$isNull(request.templateType)) {
    query['TemplateType'] = request.templateType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BatchUnbindTemplates',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BatchUnbindTemplatesRequest
 * @return BatchUnbindTemplatesResponse
 */
async function batchUnbindTemplates(request: BatchUnbindTemplatesRequest): BatchUnbindTemplatesResponse {
  var runtime = new $RuntimeOptions{};
  return batchUnbindTemplatesWithOptions(request, runtime);
}

model BindDirectoryRequest {
  deviceId?: string(name='DeviceId', description='This parameter is required.', example='348*****380-cn-qingdao'),
  directoryId?: string(name='DirectoryId', description='This parameter is required.', example='399*****488-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model BindDirectoryResponseBody = {
  requestId?: string(name='RequestId', example='3CB843A9-DD34-4881-B8D6-B0D539D111E4'),
}

model BindDirectoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BindDirectoryResponseBody(name='body'),
}

/**
 * @param request BindDirectoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BindDirectoryResponse
 */
async function bindDirectoryWithOptions(request: BindDirectoryRequest, runtime: $RuntimeOptions): BindDirectoryResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.deviceId)) {
    query['DeviceId'] = request.deviceId;
  }
  if (!$isNull(request.directoryId)) {
    query['DirectoryId'] = request.directoryId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BindDirectory',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BindDirectoryRequest
 * @return BindDirectoryResponse
 */
async function bindDirectory(request: BindDirectoryRequest): BindDirectoryResponse {
  var runtime = new $RuntimeOptions{};
  return bindDirectoryWithOptions(request, runtime);
}

model BindParentPlatformDeviceRequest {
  deviceId?: string(name='DeviceId', description='This parameter is required.', example='348*****380-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  parentPlatformId?: string(name='ParentPlatformId', description='This parameter is required.', example='361*****212-cn-qingdao'),
}

model BindParentPlatformDeviceResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model BindParentPlatformDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BindParentPlatformDeviceResponseBody(name='body'),
}

/**
 * @param request BindParentPlatformDeviceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BindParentPlatformDeviceResponse
 */
async function bindParentPlatformDeviceWithOptions(request: BindParentPlatformDeviceRequest, runtime: $RuntimeOptions): BindParentPlatformDeviceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.deviceId)) {
    query['DeviceId'] = request.deviceId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.parentPlatformId)) {
    query['ParentPlatformId'] = request.parentPlatformId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BindParentPlatformDevice',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BindParentPlatformDeviceRequest
 * @return BindParentPlatformDeviceResponse
 */
async function bindParentPlatformDevice(request: BindParentPlatformDeviceRequest): BindParentPlatformDeviceResponse {
  var runtime = new $RuntimeOptions{};
  return bindParentPlatformDeviceWithOptions(request, runtime);
}

model BindPurchasedDeviceRequest {
  deviceId?: string(name='DeviceId', description='This parameter is required.', example='3939*****6580539-cn-qingdao'),
  groupId?: string(name='GroupId', description='This parameter is required.', example='3484*****8732174-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  region?: string(name='Region', description='This parameter is required.', example='cn-qingdao'),
}

model BindPurchasedDeviceResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model BindPurchasedDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BindPurchasedDeviceResponseBody(name='body'),
}

/**
 * @param request BindPurchasedDeviceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BindPurchasedDeviceResponse
 */
async function bindPurchasedDeviceWithOptions(request: BindPurchasedDeviceRequest, runtime: $RuntimeOptions): BindPurchasedDeviceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.deviceId)) {
    query['DeviceId'] = request.deviceId;
  }
  if (!$isNull(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.region)) {
    query['Region'] = request.region;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BindPurchasedDevice',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BindPurchasedDeviceRequest
 * @return BindPurchasedDeviceResponse
 */
async function bindPurchasedDevice(request: BindPurchasedDeviceRequest): BindPurchasedDeviceResponse {
  var runtime = new $RuntimeOptions{};
  return bindPurchasedDeviceWithOptions(request, runtime);
}

model BindTemplateRequest {
  applyAll?: boolean(name='ApplyAll', example='false'),
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='323*****994-cn-qingdao'),
  instanceType?: string(name='InstanceType', description='This parameter is required.', example='group'),
  ownerId?: long(name='OwnerId'),
  replace?: boolean(name='Replace', example='false'),
  templateId?: string(name='TemplateId', description='This parameter is required.', example='323*****998-cn-qingdao'),
  templateType?: string(name='TemplateType', example='record'),
}

model BindTemplateResponseBody = {
  instanceId?: string(name='InstanceId', example='323*****994-cn-qingdao'),
  instanceType?: string(name='InstanceType', example='group'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  templateId?: string(name='TemplateId', example='323*****998-cn-qingdao'),
}

model BindTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: BindTemplateResponseBody(name='body'),
}

/**
 * @param request BindTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return BindTemplateResponse
 */
async function bindTemplateWithOptions(request: BindTemplateRequest, runtime: $RuntimeOptions): BindTemplateResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.applyAll)) {
    query['ApplyAll'] = request.applyAll;
  }
  if (!$isNull(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.instanceType)) {
    query['InstanceType'] = request.instanceType;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.replace)) {
    query['Replace'] = request.replace;
  }
  if (!$isNull(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!$isNull(request.templateType)) {
    query['TemplateType'] = request.templateType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'BindTemplate',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request BindTemplateRequest
 * @return BindTemplateResponse
 */
async function bindTemplate(request: BindTemplateRequest): BindTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return bindTemplateWithOptions(request, runtime);
}

model ContinuousAdjustRequest {
  focus?: string(name='Focus', example='0.5'),
  id?: string(name='Id', description='This parameter is required.', example='348*****380-cn-qingdao'),
  iris?: string(name='Iris', example='0.5'),
  ownerId?: long(name='OwnerId'),
}

model ContinuousAdjustResponseBody = {
  id?: string(name='Id', example='348*****380-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model ContinuousAdjustResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ContinuousAdjustResponseBody(name='body'),
}

/**
 * @param request ContinuousAdjustRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ContinuousAdjustResponse
 */
async function continuousAdjustWithOptions(request: ContinuousAdjustRequest, runtime: $RuntimeOptions): ContinuousAdjustResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.focus)) {
    query['Focus'] = request.focus;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.iris)) {
    query['Iris'] = request.iris;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ContinuousAdjust',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ContinuousAdjustRequest
 * @return ContinuousAdjustResponse
 */
async function continuousAdjust(request: ContinuousAdjustRequest): ContinuousAdjustResponse {
  var runtime = new $RuntimeOptions{};
  return continuousAdjustWithOptions(request, runtime);
}

model ContinuousMoveRequest {
  id?: string(name='Id', description='This parameter is required.', example='348*****380-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  pan?: string(name='Pan', example='0.5'),
  tilt?: string(name='Tilt', example='0.5'),
  zoom?: string(name='Zoom', example='0.5'),
}

model ContinuousMoveResponseBody = {
  id?: string(name='Id', example='348*****380-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model ContinuousMoveResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ContinuousMoveResponseBody(name='body'),
}

/**
 * @param request ContinuousMoveRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ContinuousMoveResponse
 */
async function continuousMoveWithOptions(request: ContinuousMoveRequest, runtime: $RuntimeOptions): ContinuousMoveResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pan)) {
    query['Pan'] = request.pan;
  }
  if (!$isNull(request.tilt)) {
    query['Tilt'] = request.tilt;
  }
  if (!$isNull(request.zoom)) {
    query['Zoom'] = request.zoom;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ContinuousMove',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ContinuousMoveRequest
 * @return ContinuousMoveResponse
 */
async function continuousMove(request: ContinuousMoveRequest): ContinuousMoveResponse {
  var runtime = new $RuntimeOptions{};
  return continuousMoveWithOptions(request, runtime);
}

model CreateDeviceRequest {
  alarmMethod?: string(name='AlarmMethod', example='0'),
  autoDirectory?: boolean(name='AutoDirectory'),
  autoPos?: boolean(name='AutoPos', example='false'),
  autoStart?: boolean(name='AutoStart', example='false'),
  description?: string(name='Description'),
  directoryId?: string(name='DirectoryId', example='399*****488-cn-qingdao'),
  dsn?: string(name='Dsn', example='7D0*****4C0'),
  gbId?: string(name='GbId', example='31000000****00000002'),
  groupId?: string(name='GroupId', description='This parameter is required.', example='348*****174-cn-qingdao'),
  ip?: string(name='Ip', example='10.10.10.10'),
  latitude?: string(name='Latitude', example='119.20'),
  longitude?: string(name='Longitude', example='45.00'),
  name?: string(name='Name'),
  ownerId?: long(name='OwnerId'),
  params?: string(name='Params', example='{}'),
  parentId?: string(name='ParentId', example='399*****774-cn-qingdao'),
  password?: string(name='Password', example='admin'),
  port?: long(name='Port', example='8080'),
  posInterval?: long(name='PosInterval', example='300'),
  type?: string(name='Type', description='This parameter is required.', example='ipc'),
  url?: string(name='Url', example='rtmp://xxx/xxx'),
  username?: string(name='Username', example='admin'),
  vendor?: string(name='Vendor'),
}

model CreateDeviceResponseBody = {
  id?: string(name='Id', example='348*****380-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model CreateDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateDeviceResponseBody(name='body'),
}

/**
 * @param request CreateDeviceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateDeviceResponse
 */
async function createDeviceWithOptions(request: CreateDeviceRequest, runtime: $RuntimeOptions): CreateDeviceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.alarmMethod)) {
    query['AlarmMethod'] = request.alarmMethod;
  }
  if (!$isNull(request.autoDirectory)) {
    query['AutoDirectory'] = request.autoDirectory;
  }
  if (!$isNull(request.autoPos)) {
    query['AutoPos'] = request.autoPos;
  }
  if (!$isNull(request.autoStart)) {
    query['AutoStart'] = request.autoStart;
  }
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.directoryId)) {
    query['DirectoryId'] = request.directoryId;
  }
  if (!$isNull(request.dsn)) {
    query['Dsn'] = request.dsn;
  }
  if (!$isNull(request.gbId)) {
    query['GbId'] = request.gbId;
  }
  if (!$isNull(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!$isNull(request.ip)) {
    query['Ip'] = request.ip;
  }
  if (!$isNull(request.latitude)) {
    query['Latitude'] = request.latitude;
  }
  if (!$isNull(request.longitude)) {
    query['Longitude'] = request.longitude;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.params)) {
    query['Params'] = request.params;
  }
  if (!$isNull(request.parentId)) {
    query['ParentId'] = request.parentId;
  }
  if (!$isNull(request.password)) {
    query['Password'] = request.password;
  }
  if (!$isNull(request.port)) {
    query['Port'] = request.port;
  }
  if (!$isNull(request.posInterval)) {
    query['PosInterval'] = request.posInterval;
  }
  if (!$isNull(request.type)) {
    query['Type'] = request.type;
  }
  if (!$isNull(request.url)) {
    query['Url'] = request.url;
  }
  if (!$isNull(request.username)) {
    query['Username'] = request.username;
  }
  if (!$isNull(request.vendor)) {
    query['Vendor'] = request.vendor;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateDevice',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request CreateDeviceRequest
 * @return CreateDeviceResponse
 */
async function createDevice(request: CreateDeviceRequest): CreateDeviceResponse {
  var runtime = new $RuntimeOptions{};
  return createDeviceWithOptions(request, runtime);
}

model CreateDeviceAlarmRequest {
  alarm?: int32(name='Alarm', description='This parameter is required.', example='1'),
  channelId?: int32(name='ChannelId', description='This parameter is required.', example='12'),
  endTime?: long(name='EndTime', description='This parameter is required.', example='1632314789000'),
  expire?: long(name='Expire', example='3600'),
  id?: string(name='Id', description='This parameter is required.', example='348*****380-cn-qingdao'),
  objectType?: int32(name='ObjectType', description='This parameter is required.', example='0'),
  ownerId?: long(name='OwnerId'),
  startTime?: long(name='StartTime', description='This parameter is required.', example='1632121707000'),
  subAlarm?: int32(name='SubAlarm', description='This parameter is required.'),
}

model CreateDeviceAlarmResponseBody = {
  alarmDelay?: long(name='AlarmDelay', example='60'),
  alarmId?: string(name='AlarmId', example='0hyNgTdgv2D000195842'),
  expire?: long(name='Expire', example='3600'),
  requestId?: string(name='RequestId', example='76E11E6A-4441-51C9-AF60-D354362257A7'),
  url?: string(name='Url', example='rtmp://demo.aliyundoc.com/live/310101*****7542007?auth_key=1639130258-0-0-b2b04fe85ece6*****a6b1a42bc7e'),
}

model CreateDeviceAlarmResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateDeviceAlarmResponseBody(name='body'),
}

/**
 * @param request CreateDeviceAlarmRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateDeviceAlarmResponse
 */
async function createDeviceAlarmWithOptions(request: CreateDeviceAlarmRequest, runtime: $RuntimeOptions): CreateDeviceAlarmResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.alarm)) {
    query['Alarm'] = request.alarm;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.expire)) {
    query['Expire'] = request.expire;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.objectType)) {
    query['ObjectType'] = request.objectType;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!$isNull(request.subAlarm)) {
    query['SubAlarm'] = request.subAlarm;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateDeviceAlarm',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request CreateDeviceAlarmRequest
 * @return CreateDeviceAlarmResponse
 */
async function createDeviceAlarm(request: CreateDeviceAlarmRequest): CreateDeviceAlarmResponse {
  var runtime = new $RuntimeOptions{};
  return createDeviceAlarmWithOptions(request, runtime);
}

model CreateDirectoryRequest {
  description?: string(name='Description'),
  groupId?: string(name='GroupId', description='This parameter is required.', example='348*****174-cn-qingdao'),
  name?: string(name='Name', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  parentId?: string(name='ParentId', description='This parameter is required.', example='399*****774-cn-qingdao'),
}

model CreateDirectoryResponseBody = {
  id?: string(name='Id', example='399*****488-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model CreateDirectoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateDirectoryResponseBody(name='body'),
}

/**
 * @param request CreateDirectoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateDirectoryResponse
 */
async function createDirectoryWithOptions(request: CreateDirectoryRequest, runtime: $RuntimeOptions): CreateDirectoryResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.parentId)) {
    query['ParentId'] = request.parentId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateDirectory',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request CreateDirectoryRequest
 * @return CreateDirectoryResponse
 */
async function createDirectory(request: CreateDirectoryRequest): CreateDirectoryResponse {
  var runtime = new $RuntimeOptions{};
  return createDirectoryWithOptions(request, runtime);
}

model CreateGroupRequest {
  app?: string(name='App', example='live'),
  callback?: string(name='Callback', example='http://example.com/callback'),
  description?: string(name='Description'),
  inProtocol?: string(name='InProtocol', description='This parameter is required.', example='rtmp'),
  lazyPull?: boolean(name='LazyPull', example='false'),
  name?: string(name='Name', description='This parameter is required.'),
  outProtocol?: string(name='OutProtocol', example='flv,rtmp'),
  ownerId?: long(name='OwnerId'),
  playDomain?: string(name='PlayDomain', example='demo.aliyundoc.com'),
  pushDomain?: string(name='PushDomain', example='example.aliyundoc.com'),
  region?: string(name='Region', example='cn-shanghai'),
}

model CreateGroupResponseBody = {
  gbId?: string(name='GbId', example='31000000****00000001'),
  gbIp?: string(name='GbIp', example='10.10.10.10'),
  gbPort?: long(name='GbPort', example='5060'),
  id?: string(name='Id', example='33763****77224964-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model CreateGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateGroupResponseBody(name='body'),
}

/**
 * @param request CreateGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateGroupResponse
 */
async function createGroupWithOptions(request: CreateGroupRequest, runtime: $RuntimeOptions): CreateGroupResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.app)) {
    query['App'] = request.app;
  }
  if (!$isNull(request.callback)) {
    query['Callback'] = request.callback;
  }
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.inProtocol)) {
    query['InProtocol'] = request.inProtocol;
  }
  if (!$isNull(request.lazyPull)) {
    query['LazyPull'] = request.lazyPull;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.outProtocol)) {
    query['OutProtocol'] = request.outProtocol;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.playDomain)) {
    query['PlayDomain'] = request.playDomain;
  }
  if (!$isNull(request.pushDomain)) {
    query['PushDomain'] = request.pushDomain;
  }
  if (!$isNull(request.region)) {
    query['Region'] = request.region;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateGroup',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request CreateGroupRequest
 * @return CreateGroupResponse
 */
async function createGroup(request: CreateGroupRequest): CreateGroupResponse {
  var runtime = new $RuntimeOptions{};
  return createGroupWithOptions(request, runtime);
}

model CreateParentPlatformRequest {
  autoStart?: boolean(name='AutoStart', example='false'),
  clientAuth?: boolean(name='ClientAuth', example='true'),
  clientPassword?: string(name='ClientPassword', example='admin123'),
  clientUsername?: string(name='ClientUsername', example='user01'),
  description?: string(name='Description'),
  gbId?: string(name='GbId', description='This parameter is required.', example='31000*****2170123451'),
  ip?: string(name='Ip', description='This parameter is required.', example='10.10.10.10'),
  name?: string(name='Name', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  port?: long(name='Port', description='This parameter is required.', example='5060'),
  protocol?: string(name='Protocol', example='gb28181'),
}

model CreateParentPlatformResponseBody = {
  id?: string(name='Id', example='359*****374-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model CreateParentPlatformResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateParentPlatformResponseBody(name='body'),
}

/**
 * @param request CreateParentPlatformRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateParentPlatformResponse
 */
async function createParentPlatformWithOptions(request: CreateParentPlatformRequest, runtime: $RuntimeOptions): CreateParentPlatformResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.autoStart)) {
    query['AutoStart'] = request.autoStart;
  }
  if (!$isNull(request.clientAuth)) {
    query['ClientAuth'] = request.clientAuth;
  }
  if (!$isNull(request.clientPassword)) {
    query['ClientPassword'] = request.clientPassword;
  }
  if (!$isNull(request.clientUsername)) {
    query['ClientUsername'] = request.clientUsername;
  }
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.gbId)) {
    query['GbId'] = request.gbId;
  }
  if (!$isNull(request.ip)) {
    query['Ip'] = request.ip;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.port)) {
    query['Port'] = request.port;
  }
  if (!$isNull(request.protocol)) {
    query['Protocol'] = request.protocol;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateParentPlatform',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request CreateParentPlatformRequest
 * @return CreateParentPlatformResponse
 */
async function createParentPlatform(request: CreateParentPlatformRequest): CreateParentPlatformResponse {
  var runtime = new $RuntimeOptions{};
  return createParentPlatformWithOptions(request, runtime);
}

model CreateRenderingDataPackageRequest {
  category?: string(name='Category'),
  description?: string(name='Description', example='testdescription'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model CreateRenderingDataPackageResponseBody = {
  dataPackageId?: string(name='DataPackageId', example='dp-9f8c57355d224ad7beaf95e145f22111'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model CreateRenderingDataPackageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateRenderingDataPackageResponseBody(name='body'),
}

/**
 * @summary 创建云渲染数据包
 *
 * @param request CreateRenderingDataPackageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateRenderingDataPackageResponse
 */
async function createRenderingDataPackageWithOptions(request: CreateRenderingDataPackageRequest, runtime: $RuntimeOptions): CreateRenderingDataPackageResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.category)) {
    query['Category'] = request.category;
  }
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateRenderingDataPackage',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 创建云渲染数据包
 *
 * @param request CreateRenderingDataPackageRequest
 * @return CreateRenderingDataPackageResponse
 */
async function createRenderingDataPackage(request: CreateRenderingDataPackageRequest): CreateRenderingDataPackageResponse {
  var runtime = new $RuntimeOptions{};
  return createRenderingDataPackageWithOptions(request, runtime);
}

model CreateRenderingInstanceRequest {
  autoRenew?: boolean(name='AutoRenew', example='true'),
  clientInfo?: {
    clientIp?: string(name='ClientIp', example='172.21.128.110'),
  }(name='ClientInfo'),
  instanceBillingCycle?: string(name='InstanceBillingCycle'),
  instanceChargeType?: string(name='InstanceChargeType', example='PrePaid'),
  internetChargeType?: string(name='InternetChargeType', example='95BandwidthByMonth'),
  internetMaxBandwidth?: long(name='InternetMaxBandwidth', example='10'),
  period?: string(name='Period', example='1'),
  renderingSpec?: string(name='RenderingSpec', description='This parameter is required.', example='crs.cp.l1'),
  storageSize?: string(name='StorageSize'),
}

model CreateRenderingInstanceShrinkRequest {
  autoRenew?: boolean(name='AutoRenew', example='true'),
  clientInfoShrink?: string(name='ClientInfo'),
  instanceBillingCycle?: string(name='InstanceBillingCycle'),
  instanceChargeType?: string(name='InstanceChargeType', example='PrePaid'),
  internetChargeType?: string(name='InternetChargeType', example='95BandwidthByMonth'),
  internetMaxBandwidth?: long(name='InternetMaxBandwidth', example='10'),
  period?: string(name='Period', example='1'),
  renderingSpec?: string(name='RenderingSpec', description='This parameter is required.', example='crs.cp.l1'),
  storageSize?: string(name='StorageSize'),
}

model CreateRenderingInstanceResponseBody = {
  renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
  requestId?: string(name='RequestId', description='Id of the request', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model CreateRenderingInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateRenderingInstanceResponseBody(name='body'),
}

/**
 * @summary 申请云渲染资源实例
 *
 * @param tmpReq CreateRenderingInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateRenderingInstanceResponse
 */
async function createRenderingInstanceWithOptions(tmpReq: CreateRenderingInstanceRequest, runtime: $RuntimeOptions): CreateRenderingInstanceResponse {
  tmpReq.validate();
  var request = new CreateRenderingInstanceShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.clientInfo)) {
    request.clientInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.clientInfo, 'ClientInfo', 'json');
  }
  var query = {};
  if (!$isNull(request.autoRenew)) {
    query['AutoRenew'] = request.autoRenew;
  }
  if (!$isNull(request.clientInfoShrink)) {
    query['ClientInfo'] = request.clientInfoShrink;
  }
  if (!$isNull(request.instanceBillingCycle)) {
    query['InstanceBillingCycle'] = request.instanceBillingCycle;
  }
  if (!$isNull(request.instanceChargeType)) {
    query['InstanceChargeType'] = request.instanceChargeType;
  }
  if (!$isNull(request.internetChargeType)) {
    query['InternetChargeType'] = request.internetChargeType;
  }
  if (!$isNull(request.internetMaxBandwidth)) {
    query['InternetMaxBandwidth'] = request.internetMaxBandwidth;
  }
  if (!$isNull(request.period)) {
    query['Period'] = request.period;
  }
  if (!$isNull(request.renderingSpec)) {
    query['RenderingSpec'] = request.renderingSpec;
  }
  if (!$isNull(request.storageSize)) {
    query['StorageSize'] = request.storageSize;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateRenderingInstance',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 申请云渲染资源实例
 *
 * @param request CreateRenderingInstanceRequest
 * @return CreateRenderingInstanceResponse
 */
async function createRenderingInstance(request: CreateRenderingInstanceRequest): CreateRenderingInstanceResponse {
  var runtime = new $RuntimeOptions{};
  return createRenderingInstanceWithOptions(request, runtime);
}

model CreateRenderingInstanceGatewayRequest {
  gatewayInstanceId?: string(name='GatewayInstanceId', description='This parameter is required.', example='render-xxx'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model CreateRenderingInstanceGatewayResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model CreateRenderingInstanceGatewayResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateRenderingInstanceGatewayResponseBody(name='body'),
}

/**
 * @summary 创建自定义网关
 *
 * @param request CreateRenderingInstanceGatewayRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateRenderingInstanceGatewayResponse
 */
async function createRenderingInstanceGatewayWithOptions(request: CreateRenderingInstanceGatewayRequest, runtime: $RuntimeOptions): CreateRenderingInstanceGatewayResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.gatewayInstanceId)) {
    query['GatewayInstanceId'] = request.gatewayInstanceId;
  }
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateRenderingInstanceGateway',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 创建自定义网关
 *
 * @param request CreateRenderingInstanceGatewayRequest
 * @return CreateRenderingInstanceGatewayResponse
 */
async function createRenderingInstanceGateway(request: CreateRenderingInstanceGatewayRequest): CreateRenderingInstanceGatewayResponse {
  var runtime = new $RuntimeOptions{};
  return createRenderingInstanceGatewayWithOptions(request, runtime);
}

model CreateStreamSnapshotRequest {
  id?: string(name='Id', description='This parameter is required.', example='323*****997-cn-qingdao'),
  location?: string(name='Location', example='device'),
  ownerId?: long(name='OwnerId'),
}

model CreateStreamSnapshotResponseBody = {
  format?: string(name='Format', example='jpg'),
  height?: long(name='Height', example='720'),
  id?: string(name='Id', example='323*****997-cn-qingdao'),
  ossBucket?: string(name='OssBucket', example='examplebucket'),
  ossEndpoint?: string(name='OssEndpoint', example='oss-cn-qingdao.aliyuncs.com'),
  ossObject?: string(name='OssObject', example='photos/live/340200*****100049/ondemand-1639126601767.jpg'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  timestamp?: long(name='Timestamp', example='1639126601767'),
  url?: string(name='Url', example='http://examplebucket.oss-*****.aliyuncs.com/photos/live/340200*****100049/ondemand-1639126601767.jpg'),
  width?: long(name='Width', example='1280'),
}

model CreateStreamSnapshotResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateStreamSnapshotResponseBody(name='body'),
}

/**
 * @param request CreateStreamSnapshotRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateStreamSnapshotResponse
 */
async function createStreamSnapshotWithOptions(request: CreateStreamSnapshotRequest, runtime: $RuntimeOptions): CreateStreamSnapshotResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.location)) {
    query['Location'] = request.location;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateStreamSnapshot',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request CreateStreamSnapshotRequest
 * @return CreateStreamSnapshotResponse
 */
async function createStreamSnapshot(request: CreateStreamSnapshotRequest): CreateStreamSnapshotResponse {
  var runtime = new $RuntimeOptions{};
  return createStreamSnapshotWithOptions(request, runtime);
}

model CreateTemplateRequest {
  callback?: string(name='Callback', example='http://example.com/callback'),
  description?: string(name='Description'),
  fileFormat?: string(name='FileFormat', example='hls'),
  flv?: string(name='Flv', example='osspath/record/{StreamName}/{EscapedStartTime}_{EscapedEndTime}'),
  hlsM3u8?: string(name='HlsM3u8', example='osspath/record/{StreamName}/{EscapedStartTime}_{EscapedEndTime}'),
  hlsTs?: string(name='HlsTs', example='osspath/record/{StreamName}/{UnixTimestamp}_{Sequence}'),
  interval?: long(name='Interval', example='3600'),
  jpgOnDemand?: string(name='JpgOnDemand', example='osspath/snapshot/{AppName}/{StreamName}/{UnixTimestamp}_ondemand.jpg'),
  jpgOverwrite?: string(name='JpgOverwrite', example='osspath/snapshot/{AppName}/{StreamName}.jpg'),
  jpgSequence?: string(name='JpgSequence', example='osspath/snapshot/{AppName}/{StreamName}/{UnixTimestamp}.jpg'),
  mp4?: string(name='Mp4', example='osspath/record/{StreamName}/{EscapedStartTime}_{EscapedEndTime}'),
  name?: string(name='Name', description='This parameter is required.'),
  ossBucket?: string(name='OssBucket', example='bucketname'),
  ossEndpoint?: string(name='OssEndpoint', example='oss-cn-qingdao.aliyuncs.com'),
  ossFilePrefix?: string(name='OssFilePrefix', example='oss-prefix'),
  ownerId?: long(name='OwnerId'),
  region?: string(name='Region', example='cn-qingdao'),
  retention?: long(name='Retention', example='3'),
  transConfigsJSON?: string(name='TransConfigsJSON', example='[{"Fps":25,"Gop":50,"Height":720,"VideoCodec":"h264","Width":1280,"Name":"sd","VideoBitrate":800}]'),
  trigger?: string(name='Trigger', example='auto'),
  type?: string(name='Type', description='This parameter is required.', example='record'),
}

model CreateTemplateResponseBody = {
  id?: string(name='Id', example='399*****735-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model CreateTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: CreateTemplateResponseBody(name='body'),
}

/**
 * @param request CreateTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return CreateTemplateResponse
 */
async function createTemplateWithOptions(request: CreateTemplateRequest, runtime: $RuntimeOptions): CreateTemplateResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.callback)) {
    query['Callback'] = request.callback;
  }
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.fileFormat)) {
    query['FileFormat'] = request.fileFormat;
  }
  if (!$isNull(request.flv)) {
    query['Flv'] = request.flv;
  }
  if (!$isNull(request.hlsM3u8)) {
    query['HlsM3u8'] = request.hlsM3u8;
  }
  if (!$isNull(request.hlsTs)) {
    query['HlsTs'] = request.hlsTs;
  }
  if (!$isNull(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!$isNull(request.jpgOnDemand)) {
    query['JpgOnDemand'] = request.jpgOnDemand;
  }
  if (!$isNull(request.jpgOverwrite)) {
    query['JpgOverwrite'] = request.jpgOverwrite;
  }
  if (!$isNull(request.jpgSequence)) {
    query['JpgSequence'] = request.jpgSequence;
  }
  if (!$isNull(request.mp4)) {
    query['Mp4'] = request.mp4;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ossBucket)) {
    query['OssBucket'] = request.ossBucket;
  }
  if (!$isNull(request.ossEndpoint)) {
    query['OssEndpoint'] = request.ossEndpoint;
  }
  if (!$isNull(request.ossFilePrefix)) {
    query['OssFilePrefix'] = request.ossFilePrefix;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.region)) {
    query['Region'] = request.region;
  }
  if (!$isNull(request.retention)) {
    query['Retention'] = request.retention;
  }
  if (!$isNull(request.transConfigsJSON)) {
    query['TransConfigsJSON'] = request.transConfigsJSON;
  }
  if (!$isNull(request.trigger)) {
    query['Trigger'] = request.trigger;
  }
  if (!$isNull(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'CreateTemplate',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request CreateTemplateRequest
 * @return CreateTemplateResponse
 */
async function createTemplate(request: CreateTemplateRequest): CreateTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return createTemplateWithOptions(request, runtime);
}

model DeleteCloudAppRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='cap-b06b26edfhytbn b94a75ae1a79efc90eb'),
}

model DeleteCloudAppResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DeleteCloudAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteCloudAppResponseBody(name='body'),
}

/**
 * @summary 删除云应用
 *
 * @param request DeleteCloudAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteCloudAppResponse
 */
async function deleteCloudAppWithOptions(request: DeleteCloudAppRequest, runtime: $RuntimeOptions): DeleteCloudAppResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteCloudApp',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 删除云应用
 *
 * @param request DeleteCloudAppRequest
 * @return DeleteCloudAppResponse
 */
async function deleteCloudApp(request: DeleteCloudAppRequest): DeleteCloudAppResponse {
  var runtime = new $RuntimeOptions{};
  return deleteCloudAppWithOptions(request, runtime);
}

model DeleteDeviceRequest {
  id?: string(name='Id', description='This parameter is required.', example='3238848****092996'),
  ownerId?: long(name='OwnerId'),
}

model DeleteDeviceResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DeleteDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDeviceResponseBody(name='body'),
}

/**
 * @param request DeleteDeviceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDeviceResponse
 */
async function deleteDeviceWithOptions(request: DeleteDeviceRequest, runtime: $RuntimeOptions): DeleteDeviceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteDevice',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteDeviceRequest
 * @return DeleteDeviceResponse
 */
async function deleteDevice(request: DeleteDeviceRequest): DeleteDeviceResponse {
  var runtime = new $RuntimeOptions{};
  return deleteDeviceWithOptions(request, runtime);
}

model DeleteDirectoryRequest {
  id?: string(name='Id', description='This parameter is required.', example='348*****174-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model DeleteDirectoryResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DeleteDirectoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteDirectoryResponseBody(name='body'),
}

/**
 * @param request DeleteDirectoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteDirectoryResponse
 */
async function deleteDirectoryWithOptions(request: DeleteDirectoryRequest, runtime: $RuntimeOptions): DeleteDirectoryResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteDirectory',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteDirectoryRequest
 * @return DeleteDirectoryResponse
 */
async function deleteDirectory(request: DeleteDirectoryRequest): DeleteDirectoryResponse {
  var runtime = new $RuntimeOptions{};
  return deleteDirectoryWithOptions(request, runtime);
}

model DeleteFileRequest {
  fileId?: string(name='FileId', description='This parameter is required.', example='f-167131acd45omat771813f7141d28db2f7'),
}

model DeleteFileResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DeleteFileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteFileResponseBody(name='body'),
}

/**
 * @summary 删除文件对象。
 *
 * @param request DeleteFileRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteFileResponse
 */
async function deleteFileWithOptions(request: DeleteFileRequest, runtime: $RuntimeOptions): DeleteFileResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.fileId)) {
    query['FileId'] = request.fileId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteFile',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 删除文件对象。
 *
 * @param request DeleteFileRequest
 * @return DeleteFileResponse
 */
async function deleteFile(request: DeleteFileRequest): DeleteFileResponse {
  var runtime = new $RuntimeOptions{};
  return deleteFileWithOptions(request, runtime);
}

model DeleteGroupRequest {
  id?: string(name='Id', description='This parameter is required.', example='33763950751395843'),
  ownerId?: long(name='OwnerId', example='123456'),
}

model DeleteGroupResponseBody = {
  requestId?: string(name='RequestId', description='Request Id', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DeleteGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteGroupResponseBody(name='body'),
}

/**
 * @param request DeleteGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteGroupResponse
 */
async function deleteGroupWithOptions(request: DeleteGroupRequest, runtime: $RuntimeOptions): DeleteGroupResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteGroup',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteGroupRequest
 * @return DeleteGroupResponse
 */
async function deleteGroup(request: DeleteGroupRequest): DeleteGroupResponse {
  var runtime = new $RuntimeOptions{};
  return deleteGroupWithOptions(request, runtime);
}

model DeleteParentPlatformRequest {
  id?: string(name='Id', description='This parameter is required.', example='359*****374-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model DeleteParentPlatformResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DeleteParentPlatformResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteParentPlatformResponseBody(name='body'),
}

/**
 * @param request DeleteParentPlatformRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteParentPlatformResponse
 */
async function deleteParentPlatformWithOptions(request: DeleteParentPlatformRequest, runtime: $RuntimeOptions): DeleteParentPlatformResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteParentPlatform',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteParentPlatformRequest
 * @return DeleteParentPlatformResponse
 */
async function deleteParentPlatform(request: DeleteParentPlatformRequest): DeleteParentPlatformResponse {
  var runtime = new $RuntimeOptions{};
  return deleteParentPlatformWithOptions(request, runtime);
}

model DeletePresetRequest {
  id?: string(name='Id', description='This parameter is required.', example='348*****380-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  presetId?: string(name='PresetId', description='This parameter is required.', example='2'),
}

model DeletePresetResponseBody = {
  id?: string(name='Id', example='348*****380-cn-qingdao'),
  requestId?: string(name='RequestId', example='F18FD685-B194-4489-9609-F80A9490A258'),
}

model DeletePresetResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeletePresetResponseBody(name='body'),
}

/**
 * @param request DeletePresetRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeletePresetResponse
 */
async function deletePresetWithOptions(request: DeletePresetRequest, runtime: $RuntimeOptions): DeletePresetResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.presetId)) {
    query['PresetId'] = request.presetId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeletePreset',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeletePresetRequest
 * @return DeletePresetResponse
 */
async function deletePreset(request: DeletePresetRequest): DeletePresetResponse {
  var runtime = new $RuntimeOptions{};
  return deletePresetWithOptions(request, runtime);
}

model DeletePublicKeyRequest {
  keyName?: string(name='KeyName', description='This parameter is required.', example='appKey'),
}

model DeletePublicKeyResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DeletePublicKeyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeletePublicKeyResponseBody(name='body'),
}

/**
 * @summary 删除公钥信息
 *
 * @param request DeletePublicKeyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeletePublicKeyResponse
 */
async function deletePublicKeyWithOptions(request: DeletePublicKeyRequest, runtime: $RuntimeOptions): DeletePublicKeyResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.keyName)) {
    query['KeyName'] = request.keyName;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeletePublicKey',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 删除公钥信息
 *
 * @param request DeletePublicKeyRequest
 * @return DeletePublicKeyResponse
 */
async function deletePublicKey(request: DeletePublicKeyRequest): DeletePublicKeyResponse {
  var runtime = new $RuntimeOptions{};
  return deletePublicKeyWithOptions(request, runtime);
}

model DeleteRenderingInstanceConfigurationRequest {
  configuration?: [ 
    {
      attributeNames?: [ string ](name='AttributeNames'),
      moduleName?: string(name='ModuleName', description='This parameter is required.', example='location'),
    }
  ](name='Configuration'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model DeleteRenderingInstanceConfigurationShrinkRequest {
  configurationShrink?: string(name='Configuration'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model DeleteRenderingInstanceConfigurationResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DeleteRenderingInstanceConfigurationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteRenderingInstanceConfigurationResponseBody(name='body'),
}

/**
 * @summary 删除云渲染实例配置参数
 *
 * @param tmpReq DeleteRenderingInstanceConfigurationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteRenderingInstanceConfigurationResponse
 */
async function deleteRenderingInstanceConfigurationWithOptions(tmpReq: DeleteRenderingInstanceConfigurationRequest, runtime: $RuntimeOptions): DeleteRenderingInstanceConfigurationResponse {
  tmpReq.validate();
  var request = new DeleteRenderingInstanceConfigurationShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.configuration)) {
    request.configurationShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.configuration, 'Configuration', 'json');
  }
  var query = {};
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.configurationShrink)) {
    body['Configuration'] = request.configurationShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteRenderingInstanceConfiguration',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 删除云渲染实例配置参数
 *
 * @param request DeleteRenderingInstanceConfigurationRequest
 * @return DeleteRenderingInstanceConfigurationResponse
 */
async function deleteRenderingInstanceConfiguration(request: DeleteRenderingInstanceConfigurationRequest): DeleteRenderingInstanceConfigurationResponse {
  var runtime = new $RuntimeOptions{};
  return deleteRenderingInstanceConfigurationWithOptions(request, runtime);
}

model DeleteRenderingInstanceGatewayRequest {
  renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model DeleteRenderingInstanceGatewayResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DeleteRenderingInstanceGatewayResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteRenderingInstanceGatewayResponseBody(name='body'),
}

/**
 * @summary 删除自定义网关
 *
 * @param request DeleteRenderingInstanceGatewayRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteRenderingInstanceGatewayResponse
 */
async function deleteRenderingInstanceGatewayWithOptions(request: DeleteRenderingInstanceGatewayRequest, runtime: $RuntimeOptions): DeleteRenderingInstanceGatewayResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteRenderingInstanceGateway',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 删除自定义网关
 *
 * @param request DeleteRenderingInstanceGatewayRequest
 * @return DeleteRenderingInstanceGatewayResponse
 */
async function deleteRenderingInstanceGateway(request: DeleteRenderingInstanceGatewayRequest): DeleteRenderingInstanceGatewayResponse {
  var runtime = new $RuntimeOptions{};
  return deleteRenderingInstanceGatewayWithOptions(request, runtime);
}

model DeleteRenderingInstanceSettingsRequest {
  attributeNames?: [ string ](name='AttributeNames'),
  renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model DeleteRenderingInstanceSettingsShrinkRequest {
  attributeNamesShrink?: string(name='AttributeNames'),
  renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model DeleteRenderingInstanceSettingsResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DeleteRenderingInstanceSettingsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteRenderingInstanceSettingsResponseBody(name='body'),
}

/**
 * @summary 清除实例设置
 *
 * @param tmpReq DeleteRenderingInstanceSettingsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteRenderingInstanceSettingsResponse
 */
async function deleteRenderingInstanceSettingsWithOptions(tmpReq: DeleteRenderingInstanceSettingsRequest, runtime: $RuntimeOptions): DeleteRenderingInstanceSettingsResponse {
  tmpReq.validate();
  var request = new DeleteRenderingInstanceSettingsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.attributeNames)) {
    request.attributeNamesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.attributeNames, 'AttributeNames', 'json');
  }
  var query = {};
  if (!$isNull(request.attributeNamesShrink)) {
    query['AttributeNames'] = request.attributeNamesShrink;
  }
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteRenderingInstanceSettings',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 清除实例设置
 *
 * @param request DeleteRenderingInstanceSettingsRequest
 * @return DeleteRenderingInstanceSettingsResponse
 */
async function deleteRenderingInstanceSettings(request: DeleteRenderingInstanceSettingsRequest): DeleteRenderingInstanceSettingsResponse {
  var runtime = new $RuntimeOptions{};
  return deleteRenderingInstanceSettingsWithOptions(request, runtime);
}

model DeleteTemplateRequest {
  id?: string(name='Id', description='This parameter is required.', example='323*****998-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model DeleteTemplateResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DeleteTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteTemplateResponseBody(name='body'),
}

/**
 * @param request DeleteTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteTemplateResponse
 */
async function deleteTemplateWithOptions(request: DeleteTemplateRequest, runtime: $RuntimeOptions): DeleteTemplateResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteTemplate',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteTemplateRequest
 * @return DeleteTemplateResponse
 */
async function deleteTemplate(request: DeleteTemplateRequest): DeleteTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return deleteTemplateWithOptions(request, runtime);
}

model DeleteVsPullStreamInfoConfigRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='xxxApp'),
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.com'),
  ownerId?: long(name='OwnerId'),
  streamName?: string(name='StreamName', description='This parameter is required.', example='xxxStream'),
}

model DeleteVsPullStreamInfoConfigResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DeleteVsPullStreamInfoConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteVsPullStreamInfoConfigResponseBody(name='body'),
}

/**
 * @param request DeleteVsPullStreamInfoConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteVsPullStreamInfoConfigResponse
 */
async function deleteVsPullStreamInfoConfigWithOptions(request: DeleteVsPullStreamInfoConfigRequest, runtime: $RuntimeOptions): DeleteVsPullStreamInfoConfigResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteVsPullStreamInfoConfig',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteVsPullStreamInfoConfigRequest
 * @return DeleteVsPullStreamInfoConfigResponse
 */
async function deleteVsPullStreamInfoConfig(request: DeleteVsPullStreamInfoConfigRequest): DeleteVsPullStreamInfoConfigResponse {
  var runtime = new $RuntimeOptions{};
  return deleteVsPullStreamInfoConfigWithOptions(request, runtime);
}

model DeleteVsStreamsNotifyUrlConfigRequest {
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.com'),
  ownerId?: long(name='OwnerId'),
}

model DeleteVsStreamsNotifyUrlConfigResponseBody = {
  requestId?: string(name='RequestId', example='4C747C97-7ECD-4C61-8A92-67AD806331FF'),
}

model DeleteVsStreamsNotifyUrlConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DeleteVsStreamsNotifyUrlConfigResponseBody(name='body'),
}

/**
 * @param request DeleteVsStreamsNotifyUrlConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DeleteVsStreamsNotifyUrlConfigResponse
 */
async function deleteVsStreamsNotifyUrlConfigWithOptions(request: DeleteVsStreamsNotifyUrlConfigRequest, runtime: $RuntimeOptions): DeleteVsStreamsNotifyUrlConfigResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DeleteVsStreamsNotifyUrlConfig',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DeleteVsStreamsNotifyUrlConfigRequest
 * @return DeleteVsStreamsNotifyUrlConfigResponse
 */
async function deleteVsStreamsNotifyUrlConfig(request: DeleteVsStreamsNotifyUrlConfigRequest): DeleteVsStreamsNotifyUrlConfigResponse {
  var runtime = new $RuntimeOptions{};
  return deleteVsStreamsNotifyUrlConfigWithOptions(request, runtime);
}

model DescribeAccountStatRequest {
  id?: string(name='Id'),
  ownerId?: long(name='OwnerId'),
}

model DescribeAccountStatResponseBody = {
  groupLimit?: long(name='GroupLimit', example='100'),
  groupNum?: long(name='GroupNum', example='6'),
  id?: string(name='Id', description='ID', example='3238848****092996'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  templateLimit?: long(name='TemplateLimit', example='20'),
  templateNum?: long(name='TemplateNum', example='10'),
}

model DescribeAccountStatResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeAccountStatResponseBody(name='body'),
}

/**
 * @param request DescribeAccountStatRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeAccountStatResponse
 */
async function describeAccountStatWithOptions(request: DescribeAccountStatRequest, runtime: $RuntimeOptions): DescribeAccountStatResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeAccountStat',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeAccountStatRequest
 * @return DescribeAccountStatResponse
 */
async function describeAccountStat(request: DescribeAccountStatRequest): DescribeAccountStatResponse {
  var runtime = new $RuntimeOptions{};
  return describeAccountStatWithOptions(request, runtime);
}

model DescribeDeviceRequest {
  id?: string(name='Id', description='This parameter is required.', example='3238848****092996-cn-qingdao'),
  includeDirectory?: boolean(name='IncludeDirectory', example='false'),
  includeStats?: boolean(name='IncludeStats', example='false'),
  ownerId?: long(name='OwnerId'),
}

model DescribeDeviceResponseBody = {
  alarmMethod?: string(name='AlarmMethod', example='5'),
  autoDirectory?: boolean(name='AutoDirectory'),
  autoPos?: boolean(name='AutoPos', example='false'),
  autoStart?: boolean(name='AutoStart', example='false'),
  channelSyncTime?: string(name='ChannelSyncTime', example='2019-02-28T17:01:17Z'),
  createdTime?: string(name='CreatedTime', example='2019-02-28T17:00:17Z'),
  description?: string(name='Description'),
  directory?: {
    createdTime?: string(name='CreatedTime', example='2019-02-28T17:00:17Z'),
    description?: string(name='Description'),
    groupId?: string(name='GroupId', example='3238848****092994-cn-qingdao'),
    id?: string(name='Id', example='3238848****092994-cn-qingdao'),
    name?: string(name='Name'),
    parentId?: string(name='ParentId', example='3238848****092995-cn-qingdao'),
  }(name='Directory'),
  directoryId?: string(name='DirectoryId', example='3238848****092994-cn-qingdao'),
  dsn?: string(name='Dsn', example='7D0*****4C0'),
  enabled?: boolean(name='Enabled', example='true'),
  gbId?: string(name='GbId', example='31000000****00000002'),
  groupId?: string(name='GroupId', example='3238848****092994-cn-qingdao'),
  id?: string(name='Id', example='3238848****092996-cn-qingdao'),
  ip?: string(name='Ip', example='10.10.10.10'),
  latitude?: string(name='Latitude', example='119.20'),
  longitude?: string(name='Longitude', example='45.00'),
  name?: string(name='Name'),
  params?: string(name='Params', example='{}'),
  parentId?: string(name='ParentId', example='3238848****092995-cn-qingdao'),
  password?: string(name='Password', example='admin'),
  port?: long(name='Port', example='8080'),
  posInterval?: long(name='PosInterval', example='300'),
  protocol?: string(name='Protocol', example='gb28181'),
  registeredTime?: string(name='RegisteredTime', example='2019-02-28T17:00:17Z'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  stats?: {
    channelNum?: long(name='ChannelNum', example='1'),
    failedNum?: long(name='FailedNum', example='1'),
    offlineNum?: long(name='OfflineNum', example='1'),
    onlineNum?: long(name='OnlineNum', example='1'),
    streamNum?: long(name='StreamNum', example='1'),
  }(name='Stats'),
  status?: string(name='Status', example='on'),
  type?: string(name='Type', example='ipc'),
  url?: string(name='Url', example='rtmp://xxx/xxx'),
  username?: string(name='Username', example='admin'),
  vendor?: string(name='Vendor'),
}

model DescribeDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDeviceResponseBody(name='body'),
}

/**
 * @param request DescribeDeviceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDeviceResponse
 */
async function describeDeviceWithOptions(request: DescribeDeviceRequest, runtime: $RuntimeOptions): DescribeDeviceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.includeDirectory)) {
    query['IncludeDirectory'] = request.includeDirectory;
  }
  if (!$isNull(request.includeStats)) {
    query['IncludeStats'] = request.includeStats;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeDevice',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeDeviceRequest
 * @return DescribeDeviceResponse
 */
async function describeDevice(request: DescribeDeviceRequest): DescribeDeviceResponse {
  var runtime = new $RuntimeOptions{};
  return describeDeviceWithOptions(request, runtime);
}

model DescribeDeviceChannelsRequest {
  id?: string(name='Id', description='This parameter is required.', example='348*****380-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
}

model DescribeDeviceChannelsResponseBody = {
  channels?: [ 
    {
      channelId?: long(name='ChannelId', example='0'),
      deviceId?: string(name='DeviceId', example='348*****380-cn-qingdao'),
      deviceStatus?: string(name='DeviceStatus', example='on'),
      gbId?: string(name='GbId', example='3100000****000000002'),
      name?: string(name='Name'),
      params?: string(name='Params', example='{}'),
      streamId?: string(name='StreamId', example='323*****997-cn-qingdao'),
      streamStatus?: string(name='StreamStatus', example='off'),
    }
  ](name='Channels'),
  pageCount?: long(name='PageCount', example='1'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='4641C72D-462E-4AEA-8485-FC267AF90B0A'),
  totalCount?: long(name='TotalCount', example='1'),
}

model DescribeDeviceChannelsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDeviceChannelsResponseBody(name='body'),
}

/**
 * @param request DescribeDeviceChannelsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDeviceChannelsResponse
 */
async function describeDeviceChannelsWithOptions(request: DescribeDeviceChannelsRequest, runtime: $RuntimeOptions): DescribeDeviceChannelsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeDeviceChannels',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeDeviceChannelsRequest
 * @return DescribeDeviceChannelsResponse
 */
async function describeDeviceChannels(request: DescribeDeviceChannelsRequest): DescribeDeviceChannelsResponse {
  var runtime = new $RuntimeOptions{};
  return describeDeviceChannelsWithOptions(request, runtime);
}

model DescribeDeviceGatewayRequest {
  clientIp?: string(name='ClientIp', example='192.168.0.1'),
  expire?: long(name='Expire', example='3600'),
  id?: string(name='Id', description='This parameter is required.', example='24611****70597051-cn-beijing'),
  ownerId?: long(name='OwnerId'),
}

model DescribeDeviceGatewayResponseBody = {
  host?: string(name='Host', example='192.168.0.1'),
  port?: long(name='Port', example='8080'),
  protocol?: string(name='Protocol', example='gb28181'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  token?: string(name='Token', example='f5578fbc-694c-461d-a2a2-eb090775cef0'),
}

model DescribeDeviceGatewayResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDeviceGatewayResponseBody(name='body'),
}

/**
 * @param request DescribeDeviceGatewayRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDeviceGatewayResponse
 */
async function describeDeviceGatewayWithOptions(request: DescribeDeviceGatewayRequest, runtime: $RuntimeOptions): DescribeDeviceGatewayResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.clientIp)) {
    query['ClientIp'] = request.clientIp;
  }
  if (!$isNull(request.expire)) {
    query['Expire'] = request.expire;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeDeviceGateway',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeDeviceGatewayRequest
 * @return DescribeDeviceGatewayResponse
 */
async function describeDeviceGateway(request: DescribeDeviceGatewayRequest): DescribeDeviceGatewayResponse {
  var runtime = new $RuntimeOptions{};
  return describeDeviceGatewayWithOptions(request, runtime);
}

model DescribeDeviceURLRequest {
  auth?: boolean(name='Auth'),
  expire?: long(name='Expire', example='3600'),
  id?: string(name='Id', description='This parameter is required.', example='348*****380-cn-qingdao'),
  mode?: string(name='Mode', example='push'),
  outProtocol?: string(name='OutProtocol', description='This parameter is required.', example='rtmp'),
  ownerId?: long(name='OwnerId'),
  stream?: string(name='Stream', description='This parameter is required.', example='live001'),
  type?: string(name='Type'),
}

model DescribeDeviceURLResponseBody = {
  expireTime?: long(name='ExpireTime', example='1639130258'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  url?: string(name='Url', example='rtmp://demo.aliyundoc.com/live/live001?auth_key=1639130258-0-0-b2b04fe85ece6*****a6b1a42bc7e'),
}

model DescribeDeviceURLResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDeviceURLResponseBody(name='body'),
}

/**
 * @param request DescribeDeviceURLRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDeviceURLResponse
 */
async function describeDeviceURLWithOptions(request: DescribeDeviceURLRequest, runtime: $RuntimeOptions): DescribeDeviceURLResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.auth)) {
    query['Auth'] = request.auth;
  }
  if (!$isNull(request.expire)) {
    query['Expire'] = request.expire;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.mode)) {
    query['Mode'] = request.mode;
  }
  if (!$isNull(request.outProtocol)) {
    query['OutProtocol'] = request.outProtocol;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.stream)) {
    query['Stream'] = request.stream;
  }
  if (!$isNull(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeDeviceURL',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeDeviceURLRequest
 * @return DescribeDeviceURLResponse
 */
async function describeDeviceURL(request: DescribeDeviceURLRequest): DescribeDeviceURLResponse {
  var runtime = new $RuntimeOptions{};
  return describeDeviceURLWithOptions(request, runtime);
}

model DescribeDevicesRequest {
  directoryId?: string(name='DirectoryId', example='399*****488-cn-qingdao'),
  dsn?: string(name='Dsn', example='7D0*****4C0'),
  gbId?: string(name='GbId', example='310000000****0000002'),
  groupId?: string(name='GroupId', example='348*****174-cn-qingdao'),
  id?: string(name='Id', example='348*****380-cn-qingdao'),
  includeDirectory?: boolean(name='IncludeDirectory', example='false'),
  includeStats?: boolean(name='IncludeStats', example='false'),
  name?: string(name='Name'),
  ownerId?: long(name='OwnerId'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  parentId?: string(name='ParentId', example='399*****774-cn-qingdao'),
  sortBy?: string(name='SortBy'),
  sortDirection?: string(name='SortDirection', example='asc'),
  status?: string(name='Status', example='on'),
  type?: string(name='Type', example='ipc'),
  vendor?: string(name='Vendor', example='8yd*****qem'),
}

model DescribeDevicesResponseBody = {
  devices?: [ 
    {
      alarmMethod?: string(name='AlarmMethod', example='0'),
      autoDirectory?: boolean(name='AutoDirectory', example='true'),
      autoPos?: boolean(name='AutoPos', example='false'),
      autoStart?: boolean(name='AutoStart', example='false'),
      channelSyncTime?: string(name='ChannelSyncTime', example='2019-02-28T17:01:17Z'),
      createdTime?: string(name='CreatedTime', example='2019-02-28T17:00:17Z'),
      description?: string(name='Description'),
      directory?: {
        createdTime?: string(name='CreatedTime', example='2019-02-28T17:00:17Z'),
        description?: string(name='Description'),
        groupId?: string(name='GroupId', example='348*****174-cn-qingdao'),
        id?: string(name='Id', example='399*****488-cn-qingdao'),
        name?: string(name='Name'),
        parentId?: string(name='ParentId', example='399*****774-cn-qingdao'),
      }(name='Directory'),
      directoryId?: string(name='DirectoryId', example='399*****488-cn-qingdao'),
      dsn?: string(name='Dsn', example='7D0*****4C0'),
      enabled?: boolean(name='Enabled', example='true'),
      gbId?: string(name='GbId', example='310000000****0000002'),
      groupId?: string(name='GroupId', example='348*****174-cn-qingdao'),
      id?: string(name='Id', example='348*****380-cn-qingdao'),
      ip?: string(name='Ip', example='10.10.10.10'),
      latitude?: string(name='Latitude', example='119.20'),
      longitude?: string(name='Longitude', example='45.00'),
      name?: string(name='Name'),
      params?: string(name='Params', example='{}'),
      parentId?: string(name='ParentId', example='3238848****092995'),
      password?: string(name='Password', example='admin'),
      port?: long(name='Port', example='8080'),
      posInterval?: long(name='PosInterval', example='300'),
      protocol?: string(name='Protocol', example='gb28181'),
      registeredTime?: string(name='RegisteredTime', example='2019-02-28T17:00:17Z'),
      stats?: {
        channelNum?: long(name='ChannelNum', example='0'),
        failedNum?: long(name='FailedNum', example='0'),
        offlineNum?: long(name='OfflineNum', example='0'),
        onlineNum?: long(name='OnlineNum', example='0'),
        streamNum?: long(name='StreamNum', example='0'),
      }(name='Stats'),
      status?: string(name='Status', example='on'),
      type?: string(name='Type', example='ipc'),
      url?: string(name='Url', example='rtmp://xxx/xxx'),
      username?: string(name='Username', example='admin'),
      vendor?: string(name='Vendor'),
    }
  ](name='Devices'),
  pageCount?: long(name='PageCount', example='5'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  totalCount?: long(name='TotalCount', example='77'),
}

model DescribeDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDevicesResponseBody(name='body'),
}

/**
 * @param request DescribeDevicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDevicesResponse
 */
async function describeDevicesWithOptions(request: DescribeDevicesRequest, runtime: $RuntimeOptions): DescribeDevicesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.directoryId)) {
    query['DirectoryId'] = request.directoryId;
  }
  if (!$isNull(request.dsn)) {
    query['Dsn'] = request.dsn;
  }
  if (!$isNull(request.gbId)) {
    query['GbId'] = request.gbId;
  }
  if (!$isNull(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.includeDirectory)) {
    query['IncludeDirectory'] = request.includeDirectory;
  }
  if (!$isNull(request.includeStats)) {
    query['IncludeStats'] = request.includeStats;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.parentId)) {
    query['ParentId'] = request.parentId;
  }
  if (!$isNull(request.sortBy)) {
    query['SortBy'] = request.sortBy;
  }
  if (!$isNull(request.sortDirection)) {
    query['SortDirection'] = request.sortDirection;
  }
  if (!$isNull(request.status)) {
    query['Status'] = request.status;
  }
  if (!$isNull(request.type)) {
    query['Type'] = request.type;
  }
  if (!$isNull(request.vendor)) {
    query['Vendor'] = request.vendor;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeDevices',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeDevicesRequest
 * @return DescribeDevicesResponse
 */
async function describeDevices(request: DescribeDevicesRequest): DescribeDevicesResponse {
  var runtime = new $RuntimeOptions{};
  return describeDevicesWithOptions(request, runtime);
}

model DescribeDirectoriesRequest {
  groupId?: string(name='GroupId', description='This parameter is required.', example='348*****174-cn-qingdao'),
  noPagination?: boolean(name='NoPagination', example='false'),
  ownerId?: long(name='OwnerId'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  parentId?: string(name='ParentId', example='399*****774-cn-qingdao'),
  sortBy?: string(name='SortBy', example='ID'),
  sortDirection?: string(name='SortDirection', example='asc'),
}

model DescribeDirectoriesResponseBody = {
  directories?: [ 
    {
      createdTime?: string(name='CreatedTime', example='2021-09-10T10:00:00Z'),
      description?: string(name='Description'),
      groupId?: string(name='GroupId', example='348*****174-cn-qingdao'),
      id?: string(name='Id', example='399*****488-cn-qingdao'),
      name?: string(name='Name'),
      parentId?: string(name='ParentId', example='399*****774-cn-qingdao'),
    }
  ](name='Directories'),
  pageCount?: long(name='PageCount', example='1'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  totalCount?: long(name='TotalCount', example='1'),
}

model DescribeDirectoriesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDirectoriesResponseBody(name='body'),
}

/**
 * @param request DescribeDirectoriesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDirectoriesResponse
 */
async function describeDirectoriesWithOptions(request: DescribeDirectoriesRequest, runtime: $RuntimeOptions): DescribeDirectoriesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!$isNull(request.noPagination)) {
    query['NoPagination'] = request.noPagination;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.parentId)) {
    query['ParentId'] = request.parentId;
  }
  if (!$isNull(request.sortBy)) {
    query['SortBy'] = request.sortBy;
  }
  if (!$isNull(request.sortDirection)) {
    query['SortDirection'] = request.sortDirection;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeDirectories',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeDirectoriesRequest
 * @return DescribeDirectoriesResponse
 */
async function describeDirectories(request: DescribeDirectoriesRequest): DescribeDirectoriesResponse {
  var runtime = new $RuntimeOptions{};
  return describeDirectoriesWithOptions(request, runtime);
}

model DescribeDirectoryRequest {
  id?: string(name='Id', description='This parameter is required.', example='399*****488-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model DescribeDirectoryResponseBody = {
  createdTime?: string(name='CreatedTime', example='2021-09-10T10:00:00Z'),
  description?: string(name='Description'),
  groupId?: string(name='GroupId', example='348*****174-cn-qingdao'),
  id?: string(name='Id', example='399*****488-cn-qingdao'),
  name?: string(name='Name'),
  parentId?: string(name='ParentId', example='399*****774-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DescribeDirectoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeDirectoryResponseBody(name='body'),
}

/**
 * @param request DescribeDirectoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeDirectoryResponse
 */
async function describeDirectoryWithOptions(request: DescribeDirectoryRequest, runtime: $RuntimeOptions): DescribeDirectoryResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeDirectory',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeDirectoryRequest
 * @return DescribeDirectoryResponse
 */
async function describeDirectory(request: DescribeDirectoryRequest): DescribeDirectoryResponse {
  var runtime = new $RuntimeOptions{};
  return describeDirectoryWithOptions(request, runtime);
}

model DescribeGroupRequest {
  id?: string(name='Id', description='This parameter is required.'),
  includeStats?: boolean(name='IncludeStats', example='false'),
  ownerId?: long(name='OwnerId'),
}

model DescribeGroupResponseBody = {
  aliasId?: string(name='AliasId', example='337639*****24964-cn-qingdao'),
  app?: string(name='App', example='live'),
  callback?: string(name='Callback', example='http://example.com/callback'),
  createdTime?: string(name='CreatedTime', example='2019-02-28T17:00:17Z'),
  description?: string(name='Description'),
  enabled?: boolean(name='Enabled', example='true'),
  gbId?: string(name='GbId', example='3100000*****0000001'),
  gbIp?: string(name='GbIp', example='10.10.10.10'),
  gbPort?: long(name='GbPort', example='5060'),
  gbTcpPorts?: [ string ](name='GbTcpPorts'),
  gbUdpPorts?: [ string ](name='GbUdpPorts'),
  id?: string(name='Id', example='337639****224964-cn-qingdao'),
  inProtocol?: string(name='InProtocol', example='gb28181'),
  lazyPull?: boolean(name='LazyPull', example='false'),
  name?: string(name='Name'),
  outProtocol?: string(name='OutProtocol', example='flv,hls,rtmp'),
  playDomain?: string(name='PlayDomain', example='example.aliyundoc.com'),
  pushDomain?: string(name='PushDomain', example='demo.aliyundoc.com'),
  region?: string(name='Region', example='cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  stats?: {
    deviceNum?: long(name='DeviceNum', example='200'),
    iedNum?: long(name='IedNum', example='0'),
    ipcNum?: long(name='IpcNum', example='100'),
    platformNum?: long(name='PlatformNum', example='100'),
  }(name='Stats'),
  status?: string(name='Status', example='on'),
}

model DescribeGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeGroupResponseBody(name='body'),
}

/**
 * @param request DescribeGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeGroupResponse
 */
async function describeGroupWithOptions(request: DescribeGroupRequest, runtime: $RuntimeOptions): DescribeGroupResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.includeStats)) {
    query['IncludeStats'] = request.includeStats;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeGroup',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeGroupRequest
 * @return DescribeGroupResponse
 */
async function describeGroup(request: DescribeGroupRequest): DescribeGroupResponse {
  var runtime = new $RuntimeOptions{};
  return describeGroupWithOptions(request, runtime);
}

model DescribeGroupsRequest {
  id?: string(name='Id', example='33763950877224964-cn-qingdao'),
  inProtocol?: string(name='InProtocol', example='rtmp'),
  includeStats?: boolean(name='IncludeStats', example='false'),
  name?: string(name='Name'),
  ownerId?: long(name='OwnerId'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  region?: string(name='Region', example='cn-qingdao'),
  sortBy?: string(name='SortBy'),
  sortDirection?: string(name='SortDirection', example='asc'),
  status?: string(name='Status', example='on'),
}

model DescribeGroupsResponseBody = {
  groups?: [ 
    {
      aliasId?: string(name='AliasId', example='337639*****24964-cn-qingdao'),
      app?: string(name='App', example='live'),
      callback?: string(name='Callback', example='http://example.com/callback'),
      createdTime?: string(name='CreatedTime', example='2019-02-28T17:00:17Z'),
      description?: string(name='Description'),
      enabled?: boolean(name='Enabled', example='true'),
      gbId?: string(name='GbId', example='31000000000000000001'),
      gbIp?: string(name='GbIp', example='10.10.10.10'),
      gbPort?: long(name='GbPort', example='5060'),
      gbTcpPorts?: [ string ](name='GbTcpPorts'),
      gbUdpPorts?: [ string ](name='GbUdpPorts'),
      id?: string(name='Id', example='33763950877224964-cn-qingdao'),
      inProtocol?: string(name='InProtocol', example='gb28181'),
      lazyPull?: boolean(name='LazyPull', example='false'),
      name?: string(name='Name'),
      outProtocol?: string(name='OutProtocol', example='rtmp,flv,hls'),
      playDomain?: string(name='PlayDomain', example='demo.aliyundoc.com'),
      pushDomain?: string(name='PushDomain', example='example.aliyundoc.com'),
      region?: string(name='Region', example='cn-qingdao'),
      stats?: {
        deviceNum?: long(name='DeviceNum', example='200'),
        iedNum?: long(name='IedNum', example='0'),
        ipcNum?: long(name='IpcNum', example='200'),
        platformNum?: long(name='PlatformNum', example='0'),
      }(name='Stats'),
      status?: string(name='Status', example='on'),
    }
  ](name='Groups'),
  pageCount?: long(name='PageCount', example='10'),
  pageNum?: long(name='PageNum', example='5'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  totalCount?: long(name='TotalCount', example='200'),
}

model DescribeGroupsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeGroupsResponseBody(name='body'),
}

/**
 * @param request DescribeGroupsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeGroupsResponse
 */
async function describeGroupsWithOptions(request: DescribeGroupsRequest, runtime: $RuntimeOptions): DescribeGroupsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.inProtocol)) {
    query['InProtocol'] = request.inProtocol;
  }
  if (!$isNull(request.includeStats)) {
    query['IncludeStats'] = request.includeStats;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.region)) {
    query['Region'] = request.region;
  }
  if (!$isNull(request.sortBy)) {
    query['SortBy'] = request.sortBy;
  }
  if (!$isNull(request.sortDirection)) {
    query['SortDirection'] = request.sortDirection;
  }
  if (!$isNull(request.status)) {
    query['Status'] = request.status;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeGroups',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeGroupsRequest
 * @return DescribeGroupsResponse
 */
async function describeGroups(request: DescribeGroupsRequest): DescribeGroupsResponse {
  var runtime = new $RuntimeOptions{};
  return describeGroupsWithOptions(request, runtime);
}

model DescribeParentPlatformRequest {
  id?: string(name='Id', description='This parameter is required.', example='359*****374-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model DescribeParentPlatformResponseBody = {
  autoStart?: boolean(name='AutoStart', example='false'),
  clientAuth?: boolean(name='ClientAuth', example='true'),
  clientGbId?: string(name='ClientGbId', example='31010*****317542006'),
  clientIp?: string(name='ClientIp', example='192.168.0.1'),
  clientPassword?: string(name='ClientPassword', example='admin123'),
  clientPort?: long(name='ClientPort', example='5160'),
  clientUsername?: string(name='ClientUsername', example='user01'),
  createdTime?: string(name='CreatedTime', example='2018-12-10T21:00:00Z'),
  description?: string(name='Description'),
  gbId?: string(name='GbId', example='31000*****2170123451'),
  id?: string(name='Id', example='359*****374-cn-qingdao'),
  ip?: string(name='Ip', example='10.10.10.10'),
  name?: string(name='Name'),
  port?: long(name='Port', example='5060'),
  protocol?: string(name='Protocol', example='gb28181'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  status?: string(name='Status', example='on'),
}

model DescribeParentPlatformResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeParentPlatformResponseBody(name='body'),
}

/**
 * @param request DescribeParentPlatformRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeParentPlatformResponse
 */
async function describeParentPlatformWithOptions(request: DescribeParentPlatformRequest, runtime: $RuntimeOptions): DescribeParentPlatformResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeParentPlatform',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeParentPlatformRequest
 * @return DescribeParentPlatformResponse
 */
async function describeParentPlatform(request: DescribeParentPlatformRequest): DescribeParentPlatformResponse {
  var runtime = new $RuntimeOptions{};
  return describeParentPlatformWithOptions(request, runtime);
}

model DescribeParentPlatformDevicesRequest {
  id?: string(name='Id', description='This parameter is required.', example='359*****374-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  sortBy?: string(name='SortBy', example='id'),
  sortDirection?: string(name='SortDirection', example='asc'),
}

model DescribeParentPlatformDevicesResponseBody = {
  devices?: [ 
    {
      gbId?: string(name='GbId', example='310101*****7542007'),
      groupId?: string(name='GroupId', example='3484*****8732174-cn-qingdao'),
      id?: string(name='Id', example='3487*****323380-cn-qingdao'),
      name?: string(name='Name'),
      parentId?: string(name='ParentId', example='3614*****766212-cn-qingdao'),
    }
  ](name='Devices'),
  pageCount?: long(name='PageCount', example='1'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  totalCount?: long(name='TotalCount', example='1'),
}

model DescribeParentPlatformDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeParentPlatformDevicesResponseBody(name='body'),
}

/**
 * @param request DescribeParentPlatformDevicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeParentPlatformDevicesResponse
 */
async function describeParentPlatformDevicesWithOptions(request: DescribeParentPlatformDevicesRequest, runtime: $RuntimeOptions): DescribeParentPlatformDevicesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.sortBy)) {
    query['SortBy'] = request.sortBy;
  }
  if (!$isNull(request.sortDirection)) {
    query['SortDirection'] = request.sortDirection;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeParentPlatformDevices',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeParentPlatformDevicesRequest
 * @return DescribeParentPlatformDevicesResponse
 */
async function describeParentPlatformDevices(request: DescribeParentPlatformDevicesRequest): DescribeParentPlatformDevicesResponse {
  var runtime = new $RuntimeOptions{};
  return describeParentPlatformDevicesWithOptions(request, runtime);
}

model DescribeParentPlatformsRequest {
  gbId?: string(name='GbId', example='31000*****2170123451'),
  ownerId?: long(name='OwnerId'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  sortBy?: string(name='SortBy', example='id'),
  sortDirection?: string(name='SortDirection', example='asc'),
  status?: string(name='Status', example='on'),
}

model DescribeParentPlatformsResponseBody = {
  pageCount?: long(name='PageCount', example='1'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  platforms?: [ 
    {
      autoStart?: boolean(name='AutoStart', example='false'),
      clientAuth?: boolean(name='ClientAuth', example='true'),
      clientGbId?: string(name='ClientGbId', example='31010*****317542006'),
      clientIp?: string(name='ClientIp', example='192.168.0.1'),
      clientPassword?: string(name='ClientPassword', example='admin123'),
      clientPort?: long(name='ClientPort', example='5160'),
      clientUsername?: string(name='ClientUsername', example='user01'),
      createdTime?: string(name='CreatedTime', example='2018-12-10T21:00:00Z'),
      description?: string(name='Description'),
      gbId?: string(name='GbId', example='31000*****2170123451'),
      id?: string(name='Id', example='359*****374-cn-qingdao'),
      ip?: string(name='Ip', example='10.10.10.10'),
      name?: string(name='Name'),
      port?: long(name='Port', example='5060'),
      protocol?: string(name='Protocol', example='gb28181'),
      status?: string(name='Status', example='on'),
    }
  ](name='Platforms'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  totalCount?: long(name='TotalCount', example='1'),
}

model DescribeParentPlatformsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeParentPlatformsResponseBody(name='body'),
}

/**
 * @param request DescribeParentPlatformsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeParentPlatformsResponse
 */
async function describeParentPlatformsWithOptions(request: DescribeParentPlatformsRequest, runtime: $RuntimeOptions): DescribeParentPlatformsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.gbId)) {
    query['GbId'] = request.gbId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.sortBy)) {
    query['SortBy'] = request.sortBy;
  }
  if (!$isNull(request.sortDirection)) {
    query['SortDirection'] = request.sortDirection;
  }
  if (!$isNull(request.status)) {
    query['Status'] = request.status;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeParentPlatforms',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeParentPlatformsRequest
 * @return DescribeParentPlatformsResponse
 */
async function describeParentPlatforms(request: DescribeParentPlatformsRequest): DescribeParentPlatformsResponse {
  var runtime = new $RuntimeOptions{};
  return describeParentPlatformsWithOptions(request, runtime);
}

model DescribePresetsRequest {
  id?: string(name='Id', description='This parameter is required.', example='348*****380-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model DescribePresetsResponseBody = {
  id?: string(name='Id', example='348*****380-cn-qingdao'),
  presets?: [ 
    {
      id?: string(name='Id', example='2'),
      name?: string(name='Name'),
    }
  ](name='Presets'),
  requestId?: string(name='RequestId', example='9FE0CA83-BFD3-4EBD-A429-FABB9B9AE772'),
}

model DescribePresetsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePresetsResponseBody(name='body'),
}

/**
 * @param request DescribePresetsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePresetsResponse
 */
async function describePresetsWithOptions(request: DescribePresetsRequest, runtime: $RuntimeOptions): DescribePresetsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribePresets',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribePresetsRequest
 * @return DescribePresetsResponse
 */
async function describePresets(request: DescribePresetsRequest): DescribePresetsResponse {
  var runtime = new $RuntimeOptions{};
  return describePresetsWithOptions(request, runtime);
}

model DescribePublishStreamStatusRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
}

model DescribePublishStreamStatusResponseBody = {
  code?: long(name='Code'),
  message?: long(name='Message'),
  requestId?: string(name='RequestId'),
}

model DescribePublishStreamStatusResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePublishStreamStatusResponseBody(name='body'),
}

/**
 * @param request DescribePublishStreamStatusRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePublishStreamStatusResponse
 */
async function describePublishStreamStatusWithOptions(request: DescribePublishStreamStatusRequest, runtime: $RuntimeOptions): DescribePublishStreamStatusResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribePublishStreamStatus',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribePublishStreamStatusRequest
 * @return DescribePublishStreamStatusResponse
 */
async function describePublishStreamStatus(request: DescribePublishStreamStatusRequest): DescribePublishStreamStatusResponse {
  var runtime = new $RuntimeOptions{};
  return describePublishStreamStatusWithOptions(request, runtime);
}

model DescribePurchasedDeviceRequest {
  id?: string(name='Id', description='This parameter is required.', example='3614*****66212-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model DescribePurchasedDeviceResponseBody = {
  createdTime?: string(name='CreatedTime', example='2018-12-10T21:00:00Z'),
  description?: string(name='Description'),
  groupId?: string(name='GroupId', example='348*****174-cn-qingdao'),
  groupName?: string(name='GroupName'),
  id?: string(name='Id', example='33763****77224964-cn-qingdao'),
  name?: string(name='Name', example='test'),
  orderId?: string(name='OrderId', example='2117*****0447'),
  region?: string(name='Region', example='cn-qingdao'),
  registerCode?: string(name='RegisterCode', example='12345*****67890'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  subType?: string(name='SubType', example='dome'),
  type?: string(name='Type', example='ipc'),
  vendor?: string(name='Vendor', example='8yd*****qem'),
}

model DescribePurchasedDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePurchasedDeviceResponseBody(name='body'),
}

/**
 * @param request DescribePurchasedDeviceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePurchasedDeviceResponse
 */
async function describePurchasedDeviceWithOptions(request: DescribePurchasedDeviceRequest, runtime: $RuntimeOptions): DescribePurchasedDeviceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribePurchasedDevice',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribePurchasedDeviceRequest
 * @return DescribePurchasedDeviceResponse
 */
async function describePurchasedDevice(request: DescribePurchasedDeviceRequest): DescribePurchasedDeviceResponse {
  var runtime = new $RuntimeOptions{};
  return describePurchasedDeviceWithOptions(request, runtime);
}

model DescribePurchasedDevicesRequest {
  groupId?: string(name='GroupId', example='348*****174-cn-qingdao'),
  id?: string(name='Id', example='4070*****1132-cn-qingdao'),
  name?: string(name='Name'),
  ownerId?: long(name='OwnerId'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  sortBy?: string(name='SortBy', example='id'),
  sortDirection?: string(name='SortDirection', example='asc'),
  subType?: string(name='SubType', example='dome'),
  type?: string(name='Type', example='ipc'),
  vendor?: string(name='Vendor'),
}

model DescribePurchasedDevicesResponseBody = {
  devices?: [ 
    {
      createdTime?: string(name='CreatedTime', example='2019-02-28T17:00:17Z'),
      description?: string(name='Description'),
      groupId?: string(name='GroupId', example='348*****174-cn-qingdao'),
      groupName?: string(name='GroupName'),
      id?: string(name='Id', example='348*****380-cn-qingdao'),
      name?: string(name='Name'),
      orderId?: string(name='OrderId', example='2117*****0447'),
      region?: string(name='Region', example='cn-qingdao'),
      registerCode?: string(name='RegisterCode', example='1234*****67890'),
      subType?: string(name='SubType', example='dome'),
      type?: string(name='Type', example='ipc'),
      vendor?: string(name='Vendor'),
    }
  ](name='Devices'),
  pageCount?: long(name='PageCount', example='1'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  totalCount?: long(name='TotalCount', example='1'),
}

model DescribePurchasedDevicesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribePurchasedDevicesResponseBody(name='body'),
}

/**
 * @param request DescribePurchasedDevicesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribePurchasedDevicesResponse
 */
async function describePurchasedDevicesWithOptions(request: DescribePurchasedDevicesRequest, runtime: $RuntimeOptions): DescribePurchasedDevicesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.sortBy)) {
    query['SortBy'] = request.sortBy;
  }
  if (!$isNull(request.sortDirection)) {
    query['SortDirection'] = request.sortDirection;
  }
  if (!$isNull(request.subType)) {
    query['SubType'] = request.subType;
  }
  if (!$isNull(request.type)) {
    query['Type'] = request.type;
  }
  if (!$isNull(request.vendor)) {
    query['Vendor'] = request.vendor;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribePurchasedDevices',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribePurchasedDevicesRequest
 * @return DescribePurchasedDevicesResponse
 */
async function describePurchasedDevices(request: DescribePurchasedDevicesRequest): DescribePurchasedDevicesResponse {
  var runtime = new $RuntimeOptions{};
  return describePurchasedDevicesWithOptions(request, runtime);
}

model DescribeRecordsRequest {
  endTime?: string(name='EndTime', description='This parameter is required.', example='2021-11-24T00:00:00Z'),
  ownerId?: long(name='OwnerId'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  privateBucket?: boolean(name='PrivateBucket', example='true'),
  sortBy?: string(name='SortBy', example='Id'),
  sortDirection?: string(name='SortDirection', example='asc'),
  startTime?: string(name='StartTime', description='This parameter is required.', example='2021-11-22T00:00:00Z'),
  streamId?: string(name='StreamId', description='This parameter is required.', example='323*****997-cn-qingdao'),
  type?: string(name='Type', description='This parameter is required.', example='record'),
}

model DescribeRecordsResponseBody = {
  nextStartTime?: string(name='NextStartTime', example='2018-12-10T11:00:00Z'),
  pageCount?: long(name='PageCount', example='5'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  records?: [ 
    {
      endTime?: string(name='EndTime', example='2021-11-23T18:33:48'),
      fileFormat?: string(name='FileFormat', example='hls'),
      height?: long(name='Height', example='1080'),
      id?: string(name='Id', example='2be2a673-6033-4874-b6f2-f2bc0a1*****'),
      ossBucket?: string(name='OssBucket', example='my_oss_bucket'),
      ossEndpoint?: string(name='OssEndpoint', example='oss-cn-qingdao.aliyuncs.com'),
      ossObject?: string(name='OssObject', example='record/live/310*****007/2021-11-23-18-19-38_2021-11-23-18-33-48.m3u8'),
      startTime?: string(name='StartTime', example='2021-11-23T18:19:32'),
      streamId?: string(name='StreamId', example='323*****997-cn-qingdao'),
      templateId?: string(name='TemplateId', example='388*****204-cn-qingdao'),
      type?: string(name='Type', example='record'),
      url?: string(name='Url', example='http://my_oss_bucket.oss-cn-qingdao.aliyuncs.com/record/live/310*****007/2021-11-23-18-19-38_2021-11-23-18-33-48.m3u8'),
      width?: long(name='Width', example='1920'),
    }
  ](name='Records'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  totalCount?: long(name='TotalCount', example='100'),
}

model DescribeRecordsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRecordsResponseBody(name='body'),
}

/**
 * @param request DescribeRecordsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRecordsResponse
 */
async function describeRecordsWithOptions(request: DescribeRecordsRequest, runtime: $RuntimeOptions): DescribeRecordsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.privateBucket)) {
    query['PrivateBucket'] = request.privateBucket;
  }
  if (!$isNull(request.sortBy)) {
    query['SortBy'] = request.sortBy;
  }
  if (!$isNull(request.sortDirection)) {
    query['SortDirection'] = request.sortDirection;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!$isNull(request.streamId)) {
    query['StreamId'] = request.streamId;
  }
  if (!$isNull(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeRecords',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeRecordsRequest
 * @return DescribeRecordsResponse
 */
async function describeRecords(request: DescribeRecordsRequest): DescribeRecordsResponse {
  var runtime = new $RuntimeOptions{};
  return describeRecordsWithOptions(request, runtime);
}

model DescribeRenderingInstanceRequest {
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model DescribeRenderingInstanceResponseBody = {
  configInfo?: {
    configuration?: [ 
      {
        attributes?: [ 
          {
            name?: string(name='Name', example='lon'),
            value?: any(name='Value', example='100'),
          }
        ](name='Attributes'),
        moduleName?: string(name='ModuleName', example='location'),
      }
    ](name='Configuration'),
    networkConfig?: {
      bandwidthStatus?: string(name='BandwidthStatus', example='success'),
      maxEgressBandwidth?: int32(name='MaxEgressBandwidth', example='100'),
      maxIngressBandwidth?: int32(name='MaxIngressBandwidth', example='100'),
      updateTime?: string(name='UpdateTime', example='2023-08-17T09:54:35Z'),
    }(name='NetworkConfig'),
  }(name='ConfigInfo'),
  creationTime?: string(name='CreationTime', example='2024-05-07T02:27:06Z'),
  hostname?: string(name='Hostname', example='cn-xxx.ecr.aliyuncs.com'),
  portMappings?: [ 
    {
      externalPort?: string(name='ExternalPort', example='10013/10020'),
      internalPort?: string(name='InternalPort', example='49008/49015'),
    }
  ](name='PortMappings'),
  renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
  renderingSpec?: string(name='RenderingSpec'),
  renderingStatus?: {
    description?: string(name='Description'),
    latestAction?: string(name='LatestAction', example='MigrateLocalData'),
    status?: string(name='Status', example='Working'),
  }(name='RenderingStatus'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  storageSize?: int32(name='StorageSize'),
  systemInfo?: {
    frequency?: int32(name='Frequency', example='60'),
    resolution?: string(name='Resolution', example='1920*1080'),
  }(name='SystemInfo'),
}

model DescribeRenderingInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRenderingInstanceResponseBody(name='body'),
}

/**
 * @summary 查询云渲染实例详细信息。
 *
 * @param request DescribeRenderingInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRenderingInstanceResponse
 */
async function describeRenderingInstanceWithOptions(request: DescribeRenderingInstanceRequest, runtime: $RuntimeOptions): DescribeRenderingInstanceResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeRenderingInstance',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询云渲染实例详细信息。
 *
 * @param request DescribeRenderingInstanceRequest
 * @return DescribeRenderingInstanceResponse
 */
async function describeRenderingInstance(request: DescribeRenderingInstanceRequest): DescribeRenderingInstanceResponse {
  var runtime = new $RuntimeOptions{};
  return describeRenderingInstanceWithOptions(request, runtime);
}

model DescribeRenderingInstanceConfigurationRequest {
  configuration?: [ 
    {
      attributeNames?: [ string ](name='AttributeNames'),
      moduleName?: string(name='ModuleName', description='This parameter is required.', example='location'),
    }
  ](name='Configuration'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model DescribeRenderingInstanceConfigurationShrinkRequest {
  configurationShrink?: string(name='Configuration'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model DescribeRenderingInstanceConfigurationResponseBody = {
  configuration?: [ 
    {
      attributes?: [ 
        {
          name?: string(name='Name', example='lon'),
          value?: any(name='Value', example='100'),
        }
      ](name='Attributes'),
      moduleName?: string(name='ModuleName', example='location'),
    }
  ](name='Configuration'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DescribeRenderingInstanceConfigurationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRenderingInstanceConfigurationResponseBody(name='body'),
}

/**
 * @summary 查询云渲染实例模块配置参数
 *
 * @param tmpReq DescribeRenderingInstanceConfigurationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRenderingInstanceConfigurationResponse
 */
async function describeRenderingInstanceConfigurationWithOptions(tmpReq: DescribeRenderingInstanceConfigurationRequest, runtime: $RuntimeOptions): DescribeRenderingInstanceConfigurationResponse {
  tmpReq.validate();
  var request = new DescribeRenderingInstanceConfigurationShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.configuration)) {
    request.configurationShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.configuration, 'Configuration', 'json');
  }
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeRenderingInstanceConfiguration',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询云渲染实例模块配置参数
 *
 * @param request DescribeRenderingInstanceConfigurationRequest
 * @return DescribeRenderingInstanceConfigurationResponse
 */
async function describeRenderingInstanceConfiguration(request: DescribeRenderingInstanceConfigurationRequest): DescribeRenderingInstanceConfigurationResponse {
  var runtime = new $RuntimeOptions{};
  return describeRenderingInstanceConfigurationWithOptions(request, runtime);
}

model DescribeRenderingInstanceSettingsRequest {
  attributeNames?: [ string ](name='AttributeNames'),
  renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model DescribeRenderingInstanceSettingsShrinkRequest {
  attributeNamesShrink?: string(name='AttributeNames'),
  renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model DescribeRenderingInstanceSettingsResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  settings?: [ 
    {
      attributeName?: string(name='AttributeName', example='navbar.hide'),
      attributeValue?: string(name='AttributeValue', example='1'),
    }
  ](name='Settings'),
}

model DescribeRenderingInstanceSettingsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeRenderingInstanceSettingsResponseBody(name='body'),
}

/**
 * @summary 查询实例配置
 *
 * @param tmpReq DescribeRenderingInstanceSettingsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeRenderingInstanceSettingsResponse
 */
async function describeRenderingInstanceSettingsWithOptions(tmpReq: DescribeRenderingInstanceSettingsRequest, runtime: $RuntimeOptions): DescribeRenderingInstanceSettingsResponse {
  tmpReq.validate();
  var request = new DescribeRenderingInstanceSettingsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.attributeNames)) {
    request.attributeNamesShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.attributeNames, 'AttributeNames', 'json');
  }
  var query = {};
  if (!$isNull(request.attributeNamesShrink)) {
    query['AttributeNames'] = request.attributeNamesShrink;
  }
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeRenderingInstanceSettings',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询实例配置
 *
 * @param request DescribeRenderingInstanceSettingsRequest
 * @return DescribeRenderingInstanceSettingsResponse
 */
async function describeRenderingInstanceSettings(request: DescribeRenderingInstanceSettingsRequest): DescribeRenderingInstanceSettingsResponse {
  var runtime = new $RuntimeOptions{};
  return describeRenderingInstanceSettingsWithOptions(request, runtime);
}

model DescribeStreamRequest {
  id?: string(name='Id', description='This parameter is required.', example='323*****997-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model DescribeStreamResponseBody = {
  app?: string(name='App', example='live'),
  createdTime?: string(name='CreatedTime', example='2019-02-28T17:00:17Z'),
  deviceId?: string(name='DeviceId', example='348*****380-cn-qingdao'),
  enabled?: boolean(name='Enabled', example='true'),
  groupId?: string(name='GroupId', example='348*****174-cn-qingdao'),
  height?: int32(name='Height', example='720'),
  id?: string(name='Id', example='323*****997-cn-qingdao'),
  name?: string(name='Name', example='31000000*****0000002'),
  playDomain?: string(name='PlayDomain', example='example.aliyundoc.com'),
  protocol?: string(name='Protocol', example='gb28181'),
  pushDomain?: string(name='PushDomain', example='demo.aliyundoc.com'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  status?: string(name='Status', example='on'),
  width?: int32(name='Width', example='1280'),
}

model DescribeStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeStreamResponseBody(name='body'),
}

/**
 * @param request DescribeStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeStreamResponse
 */
async function describeStreamWithOptions(request: DescribeStreamRequest, runtime: $RuntimeOptions): DescribeStreamResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeStream',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeStreamRequest
 * @return DescribeStreamResponse
 */
async function describeStream(request: DescribeStreamRequest): DescribeStreamResponse {
  var runtime = new $RuntimeOptions{};
  return describeStreamWithOptions(request, runtime);
}

model DescribeStreamURLRequest {
  auth?: boolean(name='Auth', example='true'),
  authKey?: string(name='AuthKey', example='ocs*****ace'),
  endTime?: long(name='EndTime', example='1571649499'),
  expire?: long(name='Expire', example='3600'),
  id?: string(name='Id', description='This parameter is required.', example='323*****997-cn-qingdao'),
  outProtocol?: string(name='OutProtocol', description='This parameter is required.', example='rtmp'),
  ownerId?: long(name='OwnerId'),
  startTime?: long(name='StartTime', example='1571639499'),
  transcode?: string(name='Transcode', example='sd'),
  type?: string(name='Type', example='live'),
}

model DescribeStreamURLResponseBody = {
  expireTime?: long(name='ExpireTime', example='1557977029'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  url?: string(name='Url', example='rtmp://demo.aliyundoc.com/live/310101*****7542007?auth_key=1639130258-0-0-b2b04fe85ece6*****a6b1a42bc7e'),
}

model DescribeStreamURLResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeStreamURLResponseBody(name='body'),
}

/**
 * @param request DescribeStreamURLRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeStreamURLResponse
 */
async function describeStreamURLWithOptions(request: DescribeStreamURLRequest, runtime: $RuntimeOptions): DescribeStreamURLResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.auth)) {
    query['Auth'] = request.auth;
  }
  if (!$isNull(request.authKey)) {
    query['AuthKey'] = request.authKey;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.expire)) {
    query['Expire'] = request.expire;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.outProtocol)) {
    query['OutProtocol'] = request.outProtocol;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!$isNull(request.transcode)) {
    query['Transcode'] = request.transcode;
  }
  if (!$isNull(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeStreamURL',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeStreamURLRequest
 * @return DescribeStreamURLResponse
 */
async function describeStreamURL(request: DescribeStreamURLRequest): DescribeStreamURLResponse {
  var runtime = new $RuntimeOptions{};
  return describeStreamURLWithOptions(request, runtime);
}

model DescribeStreamVodListRequest {
  endTime?: long(name='EndTime', description='This parameter is required.', example='1634873413'),
  id?: string(name='Id', description='This parameter is required.', example='18526049*****219118918-cn-beijing'),
  ownerId?: long(name='OwnerId'),
  startTime?: long(name='StartTime', description='This parameter is required.', example='1639077653'),
}

model DescribeStreamVodListResponseBody = {
  records?: [ 
    {
      endTime?: long(name='EndTime', example='1634873413'),
      startTime?: long(name='StartTime', example='1639077653'),
    }
  ](name='Records'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DescribeStreamVodListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeStreamVodListResponseBody(name='body'),
}

/**
 * @param request DescribeStreamVodListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeStreamVodListResponse
 */
async function describeStreamVodListWithOptions(request: DescribeStreamVodListRequest, runtime: $RuntimeOptions): DescribeStreamVodListResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeStreamVodList',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeStreamVodListRequest
 * @return DescribeStreamVodListResponse
 */
async function describeStreamVodList(request: DescribeStreamVodListRequest): DescribeStreamVodListResponse {
  var runtime = new $RuntimeOptions{};
  return describeStreamVodListWithOptions(request, runtime);
}

model DescribeStreamsRequest {
  app?: string(name='App', example='live'),
  deviceId?: string(name='DeviceId', example='348*****380-cn-qingdao'),
  domain?: string(name='Domain', example='example.aliyundoc.com'),
  groupId?: string(name='GroupId', example='348*****174-cn-qingdao'),
  id?: string(name='Id', example='323*****997-cn-qingdao'),
  name?: string(name='Name', example='3100000*****00000002'),
  ownerId?: long(name='OwnerId'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  parentId?: string(name='ParentId', example='399*****774-cn-qingdao'),
  sortBy?: string(name='SortBy', example='Id'),
  sortDirection?: string(name='SortDirection', example='asc'),
}

model DescribeStreamsResponseBody = {
  pageCount?: long(name='PageCount', example='5'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  streams?: [ 
    {
      app?: string(name='App', example='live'),
      createdTime?: string(name='CreatedTime', example='2018-12-10T17:00:00Z'),
      deviceId?: string(name='DeviceId', example='348*****380-cn-qingdao'),
      enabled?: boolean(name='Enabled', example='true'),
      groupId?: string(name='GroupId', example='348*****174-cn-qingdao'),
      height?: int32(name='Height', example='720'),
      id?: string(name='Id', example='323*****997-cn-qingdao'),
      name?: string(name='Name', example='31000000*****0000002'),
      playDomain?: string(name='PlayDomain', example='demo.aliyundoc.com'),
      protocol?: string(name='Protocol', example='gb28181'),
      pushDomain?: string(name='PushDomain', example='example.aliyundoc.com'),
      status?: string(name='Status', example='on'),
      width?: int32(name='Width', example='1280'),
    }
  ](name='Streams'),
  totalCount?: long(name='TotalCount', example='100'),
}

model DescribeStreamsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeStreamsResponseBody(name='body'),
}

/**
 * @param request DescribeStreamsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeStreamsResponse
 */
async function describeStreamsWithOptions(request: DescribeStreamsRequest, runtime: $RuntimeOptions): DescribeStreamsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.app)) {
    query['App'] = request.app;
  }
  if (!$isNull(request.deviceId)) {
    query['DeviceId'] = request.deviceId;
  }
  if (!$isNull(request.domain)) {
    query['Domain'] = request.domain;
  }
  if (!$isNull(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.parentId)) {
    query['ParentId'] = request.parentId;
  }
  if (!$isNull(request.sortBy)) {
    query['SortBy'] = request.sortBy;
  }
  if (!$isNull(request.sortDirection)) {
    query['SortDirection'] = request.sortDirection;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeStreams',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeStreamsRequest
 * @return DescribeStreamsResponse
 */
async function describeStreams(request: DescribeStreamsRequest): DescribeStreamsResponse {
  var runtime = new $RuntimeOptions{};
  return describeStreamsWithOptions(request, runtime);
}

model DescribeTemplateRequest {
  id?: string(name='Id', description='This parameter is required.', example='323*****998-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model DescribeTemplateResponseBody = {
  callback?: string(name='Callback', example='http://example.com/callback'),
  createdTime?: string(name='CreatedTime', example='2020-12-10T10:00:00Z'),
  description?: string(name='Description'),
  fileFormat?: string(name='FileFormat', example='hls'),
  flv?: string(name='Flv', example='osspath/record/{StreamName}/{EscapedStartTime}_{EscapedEndTime}'),
  hlsM3u8?: string(name='HlsM3u8', example='osspath/record/{StreamName}/{EscapedStartTime}_{EscapedEndTime}'),
  hlsTs?: string(name='HlsTs', example='osspath/record/{StreamName}/{UnixTimestamp}_{Sequence}'),
  id?: string(name='Id', example='323*****998-cn-qingdao'),
  interval?: long(name='Interval', example='3600'),
  jpgOnDemand?: string(name='JpgOnDemand', example='osspath/snapshot/{AppName}/{StreamName}/{UnixTimestamp}_ondemand.jpg'),
  jpgOverwrite?: string(name='JpgOverwrite', example='osspath/snapshot/{AppName}/{StreamName}.jpg'),
  jpgSequence?: string(name='JpgSequence', example='osspath/snapshot/{AppName}/{StreamName}/{UnixTimestamp}.jpg'),
  mp4?: string(name='Mp4', example='osspath/record/{StreamName}/{EscapedStartTime}_{EscapedEndTime}'),
  name?: string(name='Name'),
  ossBucket?: string(name='OssBucket', example='my_oss_bucket'),
  ossEndpoint?: string(name='OssEndpoint', example='oss-cn-qingdao.aliyuncs.com'),
  ossFilePrefix?: string(name='OssFilePrefix', example='oss-prefix'),
  region?: string(name='Region', example='cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  retention?: long(name='Retention', example='3'),
  transConfigs?: [ 
    {
      fps?: long(name='Fps', example='25'),
      gop?: long(name='Gop', example='50'),
      height?: long(name='Height', example='720'),
      id?: string(name='Id', example='399*****430-cn-qingdao'),
      name?: string(name='Name', example='sd'),
      videoBitrate?: long(name='VideoBitrate', example='800'),
      videoCodec?: string(name='VideoCodec', example='h264'),
      width?: long(name='Width', example='1280'),
    }
  ](name='TransConfigs'),
  trigger?: string(name='Trigger', example='auto'),
  type?: string(name='Type', example='record'),
}

model DescribeTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTemplateResponseBody(name='body'),
}

/**
 * @param request DescribeTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTemplateResponse
 */
async function describeTemplateWithOptions(request: DescribeTemplateRequest, runtime: $RuntimeOptions): DescribeTemplateResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeTemplate',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeTemplateRequest
 * @return DescribeTemplateResponse
 */
async function describeTemplate(request: DescribeTemplateRequest): DescribeTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return describeTemplateWithOptions(request, runtime);
}

model DescribeTemplatesRequest {
  id?: string(name='Id', example='323434****83423432'),
  instanceId?: string(name='InstanceId', example='323*****998-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  sortBy?: string(name='SortBy', example='id'),
  sortDirection?: string(name='SortDirection', example='asc'),
  type?: string(name='Type', example='record'),
}

model DescribeTemplatesResponseBody = {
  pageCount?: long(name='PageCount', example='5'),
  pageNum?: long(name='PageNum', example='1'),
  pageSize?: long(name='PageSize', example='20'),
  requestId?: string(name='RequestId', example='F3F88C96-CA6E-573E-B8F7-5BE83A1A0BCF'),
  templates?: [ 
    {
      callback?: string(name='Callback', example='http://example.com/callback'),
      createdTime?: string(name='CreatedTime', example='2018-12-10T10:00:00Z'),
      description?: string(name='Description'),
      fileFormat?: string(name='FileFormat', example='hls'),
      flv?: string(name='Flv', example='osspath/record/{StreamName}/{EscapedStartTime}_{EscapedEndTime}'),
      hlsM3u8?: string(name='HlsM3u8', example='osspath/record/{StreamName}/{EscapedStartTime}_{EscapedEndTime}'),
      hlsTs?: string(name='HlsTs', example='osspath/record/{StreamName}/{UnixTimestamp}_{Sequence}'),
      id?: string(name='Id', example='323*****998-cn-qingdao'),
      interval?: long(name='Interval', example='3600'),
      jpgOnDemand?: string(name='JpgOnDemand', example='osspath/snapshot/{AppName}/{StreamName}/{UnixTimestamp}_ondemand.jpg'),
      jpgOverwrite?: string(name='JpgOverwrite', example='osspath/snapshot/{AppName}/{StreamName}.jpg'),
      jpgSequence?: string(name='JpgSequence', example='osspath/snapshot/{AppName}/{StreamName}/{UnixTimestamp}.jpg'),
      mp4?: string(name='Mp4', example='osspath/record/{StreamName}/{EscapedStartTime}_{EscapedEndTime}'),
      name?: string(name='Name'),
      ossBucket?: string(name='OssBucket', example='my_oss_bucket'),
      ossEndpoint?: string(name='OssEndpoint', example='oss-cn-qingdao.aliyuncs.com'),
      ossFilePrefix?: string(name='OssFilePrefix', example='my_prefix'),
      region?: string(name='Region', example='cn-qingdao'),
      retention?: long(name='Retention', example='3'),
      transConfigs?: [ 
        {
          fps?: long(name='Fps', example='25'),
          gop?: long(name='Gop', example='50'),
          height?: long(name='Height', example='720'),
          name?: string(name='Name', example='sd'),
          videoBitrate?: long(name='VideoBitrate', example='800'),
          videoCodec?: string(name='VideoCodec', example='h264'),
          width?: long(name='Width', example='1280'),
          id?: string(name='id', example='399788187729597430-cn-qingdao'),
        }
      ](name='TransConfigs'),
      trigger?: string(name='Trigger', example='auto'),
      type?: string(name='Type', example='record'),
    }
  ](name='Templates'),
  totalCount?: long(name='TotalCount', example='100'),
}

model DescribeTemplatesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeTemplatesResponseBody(name='body'),
}

/**
 * @param request DescribeTemplatesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeTemplatesResponse
 */
async function describeTemplatesWithOptions(request: DescribeTemplatesRequest, runtime: $RuntimeOptions): DescribeTemplatesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.sortBy)) {
    query['SortBy'] = request.sortBy;
  }
  if (!$isNull(request.sortDirection)) {
    query['SortDirection'] = request.sortDirection;
  }
  if (!$isNull(request.type)) {
    query['Type'] = request.type;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeTemplates',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeTemplatesRequest
 * @return DescribeTemplatesResponse
 */
async function describeTemplates(request: DescribeTemplatesRequest): DescribeTemplatesResponse {
  var runtime = new $RuntimeOptions{};
  return describeTemplatesWithOptions(request, runtime);
}

model DescribeVodStreamURLRequest {
  ownerId?: long(name='OwnerId'),
  url?: string(name='Url', description='This parameter is required.', example='http://xxx/xxx.mp4'),
}

model DescribeVodStreamURLResponseBody = {
  outProtocol?: string(name='OutProtocol', example='rtsp'),
  port?: long(name='Port', example='8080'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  url?: string(name='Url', example='rtsp://domain/live/stream?sign=xxxxxx'),
}

model DescribeVodStreamURLResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVodStreamURLResponseBody(name='body'),
}

/**
 * @param request DescribeVodStreamURLRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVodStreamURLResponse
 */
async function describeVodStreamURLWithOptions(request: DescribeVodStreamURLRequest, runtime: $RuntimeOptions): DescribeVodStreamURLResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.url)) {
    query['Url'] = request.url;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVodStreamURL',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVodStreamURLRequest
 * @return DescribeVodStreamURLResponse
 */
async function describeVodStreamURL(request: DescribeVodStreamURLRequest): DescribeVodStreamURLResponse {
  var runtime = new $RuntimeOptions{};
  return describeVodStreamURLWithOptions(request, runtime);
}

model DescribeVsCertificateDetailRequest {
  certName?: string(name='CertName', description='This parameter is required.', example='cert-539xxxx'),
  ownerId?: long(name='OwnerId'),
}

model DescribeVsCertificateDetailResponseBody = {
  cert?: string(name='Cert', example='-----BEGIN CERTIFICATE-----xxxxx-----END CERTIFICATE-----'),
  certId?: long(name='CertId', example='63000000'),
  certName?: string(name='CertName', example='cert-539xxxxx'),
  key?: string(name='Key', example='xxxxx'),
  requestId?: string(name='RequestId', example='D94D0E1E-E71B-562D-8C18-969BB3653FBD'),
}

model DescribeVsCertificateDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsCertificateDetailResponseBody(name='body'),
}

/**
 * @param request DescribeVsCertificateDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsCertificateDetailResponse
 */
async function describeVsCertificateDetailWithOptions(request: DescribeVsCertificateDetailRequest, runtime: $RuntimeOptions): DescribeVsCertificateDetailResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.certName)) {
    query['CertName'] = request.certName;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsCertificateDetail',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsCertificateDetailRequest
 * @return DescribeVsCertificateDetailResponse
 */
async function describeVsCertificateDetail(request: DescribeVsCertificateDetailRequest): DescribeVsCertificateDetailResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsCertificateDetailWithOptions(request, runtime);
}

model DescribeVsCertificateListRequest {
  domainName?: string(name='DomainName', example='example.aliyundoc.com'),
  ownerId?: long(name='OwnerId'),
}

model DescribeVsCertificateListResponseBody = {
  certificateListModel?: {
    certList?: [ 
      {
        certId?: long(name='CertId', example='6338888'),
        certName?: string(name='CertName', example='cert-5391062'),
        common?: string(name='Common', example='example.aliyundoc.com'),
        fingerprint?: string(name='Fingerprint', example='3EB2585309AE5C8F369****7CDA6A8F5CEC8B2D4'),
        issuer?: string(name='Issuer', example='xxxxCert Inc'),
        lastTime?: long(name='LastTime', example='1632462708'),
      }
    ](name='CertList'),
    count?: int32(name='Count', example='2'),
  }(name='CertificateListModel'),
  requestId?: string(name='RequestId', example='6E310519-E035-51AB-80D4-C1CBECD39EB5'),
}

model DescribeVsCertificateListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsCertificateListResponseBody(name='body'),
}

/**
 * @param request DescribeVsCertificateListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsCertificateListResponse
 */
async function describeVsCertificateListWithOptions(request: DescribeVsCertificateListRequest, runtime: $RuntimeOptions): DescribeVsCertificateListResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsCertificateList',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsCertificateListRequest
 * @return DescribeVsCertificateListResponse
 */
async function describeVsCertificateList(request: DescribeVsCertificateListRequest): DescribeVsCertificateListResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsCertificateListWithOptions(request, runtime);
}

model DescribeVsDevicesDataRequest {
  endTime?: string(name='EndTime', example='2022-01-30T16:00:00Z'),
  groupId?: string(name='GroupId', example='348*****174-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime', example='2022-01-04T16:00:00Z'),
}

model DescribeVsDevicesDataResponseBody = {
  devicesDataPerInterval?: {
    dataModule?: [ 
    {
      devicesDataValue?: string(name='DevicesDataValue', example='128'),
      timeStamp?: string(name='TimeStamp', example='2022-01-04T16:00:00Z'),
    }
  ](name='DataModule')
  }(name='DevicesDataPerInterval'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DescribeVsDevicesDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsDevicesDataResponseBody(name='body'),
}

/**
 * @param request DescribeVsDevicesDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsDevicesDataResponse
 */
async function describeVsDevicesDataWithOptions(request: DescribeVsDevicesDataRequest, runtime: $RuntimeOptions): DescribeVsDevicesDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsDevicesData',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsDevicesDataRequest
 * @return DescribeVsDevicesDataResponse
 */
async function describeVsDevicesData(request: DescribeVsDevicesDataRequest): DescribeVsDevicesDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsDevicesDataWithOptions(request, runtime);
}

model DescribeVsDomainBpsDataRequest {
  domainName?: string(name='DomainName', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-10-02T02:30:48Z'),
  interval?: string(name='Interval', example='300'),
  ispNameEn?: string(name='IspNameEn', example='unicom'),
  locationNameEn?: string(name='LocationNameEn', example='guangdong'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime', example='2021-12-26T16:00:00Z'),
}

model DescribeVsDomainBpsDataResponseBody = {
  bpsDataPerInterval?: {
    dataModule?: [ 
    {
      bpsValue?: string(name='BpsValue', example='1000'),
      timeStamp?: string(name='TimeStamp', example='2015-12-10T20:00:00Z'),
    }
  ](name='DataModule')
  }(name='BpsDataPerInterval'),
  dataInterval?: string(name='DataInterval', example='2100'),
  domainName?: string(name='DomainName', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-10-01T07:10:48Z'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  startTime?: string(name='StartTime', example='2021-09-18T16:00:00Z'),
}

model DescribeVsDomainBpsDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsDomainBpsDataResponseBody(name='body'),
}

/**
 * @param request DescribeVsDomainBpsDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsDomainBpsDataResponse
 */
async function describeVsDomainBpsDataWithOptions(request: DescribeVsDomainBpsDataRequest, runtime: $RuntimeOptions): DescribeVsDomainBpsDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!$isNull(request.ispNameEn)) {
    query['IspNameEn'] = request.ispNameEn;
  }
  if (!$isNull(request.locationNameEn)) {
    query['LocationNameEn'] = request.locationNameEn;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsDomainBpsData',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsDomainBpsDataRequest
 * @return DescribeVsDomainBpsDataResponse
 */
async function describeVsDomainBpsData(request: DescribeVsDomainBpsDataRequest): DescribeVsDomainBpsDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsDomainBpsDataWithOptions(request, runtime);
}

model DescribeVsDomainCertificateInfoRequest {
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.aliyundoc.com'),
  ownerId?: long(name='OwnerId'),
}

model DescribeVsDomainCertificateInfoResponseBody = {
  certInfos?: {
    certInfo?: [ 
    {
      certDomainName?: string(name='CertDomainName', example='example.com'),
      certExpireTime?: string(name='CertExpireTime', example='2018-06-03T22:03:39Z'),
      certLife?: string(name='CertLife', example='months'),
      certName?: string(name='CertName', example='myname'),
      certOrg?: string(name='CertOrg', example='Let\\\\"s Encrypt'),
      certType?: string(name='CertType', example='free'),
      domainName?: string(name='DomainName', example='example.com'),
      SSLPub?: string(name='SSLPub', example='asdadaxxxx'),
      serverCertificateStatus?: string(name='ServerCertificateStatus', example='on'),
      status?: string(name='Status', example='success'),
    }
  ](name='CertInfo')
  }(name='CertInfos'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DescribeVsDomainCertificateInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsDomainCertificateInfoResponseBody(name='body'),
}

/**
 * @param request DescribeVsDomainCertificateInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsDomainCertificateInfoResponse
 */
async function describeVsDomainCertificateInfoWithOptions(request: DescribeVsDomainCertificateInfoRequest, runtime: $RuntimeOptions): DescribeVsDomainCertificateInfoResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsDomainCertificateInfo',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsDomainCertificateInfoRequest
 * @return DescribeVsDomainCertificateInfoResponse
 */
async function describeVsDomainCertificateInfo(request: DescribeVsDomainCertificateInfoRequest): DescribeVsDomainCertificateInfoResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsDomainCertificateInfoWithOptions(request, runtime);
}

model DescribeVsDomainConfigsRequest {
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.aliyundoc.com'),
  functionNames?: string(name='FunctionNames', description='This parameter is required.', example='path_based_ttl_set,oss_auth'),
  ownerId?: long(name='OwnerId'),
}

model DescribeVsDomainConfigsResponseBody = {
  domainConfigs?: [ 
    {
      configId?: string(name='ConfigId', example='6295'),
      functionArgs?: [ 
        {
          argName?: string(name='ArgName', example='auth_type'),
          argValue?: string(name='ArgValue', example='req_auth'),
        }
      ](name='FunctionArgs'),
      functionName?: string(name='FunctionName', example='aliauth'),
      status?: string(name='Status', example='success'),
    }
  ](name='DomainConfigs'),
  requestId?: string(name='RequestId', example='D94D0E1E-E71B-562D-8C18-969BB3653FBD'),
}

model DescribeVsDomainConfigsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsDomainConfigsResponseBody(name='body'),
}

/**
 * @param request DescribeVsDomainConfigsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsDomainConfigsResponse
 */
async function describeVsDomainConfigsWithOptions(request: DescribeVsDomainConfigsRequest, runtime: $RuntimeOptions): DescribeVsDomainConfigsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.functionNames)) {
    query['FunctionNames'] = request.functionNames;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsDomainConfigs',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsDomainConfigsRequest
 * @return DescribeVsDomainConfigsResponse
 */
async function describeVsDomainConfigs(request: DescribeVsDomainConfigsRequest): DescribeVsDomainConfigsResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsDomainConfigsWithOptions(request, runtime);
}

model DescribeVsDomainDetailRequest {
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.aliyundoc.com'),
  ownerId?: long(name='OwnerId'),
}

model DescribeVsDomainDetailResponseBody = {
  domainConfig?: {
    cname?: string(name='Cname', example='example.aliyundoc.com.*****.com'),
    description?: string(name='Description'),
    domainName?: string(name='DomainName', example='example.aliyundoc.com'),
    domainStatus?: string(name='DomainStatus', example='online'),
    domainType?: string(name='DomainType', example='vs'),
    gmtCreated?: string(name='GmtCreated', example='2021-07-19T10:27:23Z'),
    gmtModified?: string(name='GmtModified', example='2021-07-19T10:27:23Z'),
    region?: string(name='Region', example='cn-qingdao'),
    SSLProtocol?: string(name='SSLProtocol', example='off'),
    scope?: string(name='Scope', example='domestic'),
  }(name='DomainConfig'),
  requestId?: string(name='RequestId', example='9BEC5E85-C76B-56EF-A922-860EFDB8B64B'),
}

model DescribeVsDomainDetailResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsDomainDetailResponseBody(name='body'),
}

/**
 * @param request DescribeVsDomainDetailRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsDomainDetailResponse
 */
async function describeVsDomainDetailWithOptions(request: DescribeVsDomainDetailRequest, runtime: $RuntimeOptions): DescribeVsDomainDetailResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsDomainDetail',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsDomainDetailRequest
 * @return DescribeVsDomainDetailResponse
 */
async function describeVsDomainDetail(request: DescribeVsDomainDetailRequest): DescribeVsDomainDetailResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsDomainDetailWithOptions(request, runtime);
}

model DescribeVsDomainPvDataRequest {
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-10-15T15:59:59Z'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime', example='2021-10-10T17:00:00Z'),
}

model DescribeVsDomainPvDataResponseBody = {
  dataInterval?: string(name='DataInterval', example='3600'),
  domainName?: string(name='DomainName', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-11-12T15:59:59Z'),
  pvDataInterval?: {
    usageData?: [ 
    {
      timeStamp?: string(name='TimeStamp', example='2021-11-22T00:00:00Z'),
      value?: string(name='Value', example='100'),
    }
  ](name='UsageData')
  }(name='PvDataInterval'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  startTime?: string(name='StartTime', example='2021-11-22T00:00:00Z'),
}

model DescribeVsDomainPvDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsDomainPvDataResponseBody(name='body'),
}

/**
 * @param request DescribeVsDomainPvDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsDomainPvDataResponse
 */
async function describeVsDomainPvDataWithOptions(request: DescribeVsDomainPvDataRequest, runtime: $RuntimeOptions): DescribeVsDomainPvDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsDomainPvData',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsDomainPvDataRequest
 * @return DescribeVsDomainPvDataResponse
 */
async function describeVsDomainPvData(request: DescribeVsDomainPvDataRequest): DescribeVsDomainPvDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsDomainPvDataWithOptions(request, runtime);
}

model DescribeVsDomainPvUvDataRequest {
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-11-24T00:00:00Z'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime', example='2021-10-14T23:00:00Z'),
}

model DescribeVsDomainPvUvDataResponseBody = {
  dataInterval?: string(name='DataInterval', example='3600'),
  domainName?: string(name='DomainName', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-11-24T00:00:00Z'),
  pvUvDataInfos?: {
    pvUvDataInfo?: [ 
    {
      PV?: string(name='PV', example='100'),
      timeStamp?: string(name='TimeStamp', example='2021-10-14T23:00:00Z'),
      UV?: string(name='UV', example='100'),
    }
  ](name='PvUvDataInfo')
  }(name='PvUvDataInfos'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  startTime?: string(name='StartTime', example='2021-12-12T10:00:00Z'),
}

model DescribeVsDomainPvUvDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsDomainPvUvDataResponseBody(name='body'),
}

/**
 * @param request DescribeVsDomainPvUvDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsDomainPvUvDataResponse
 */
async function describeVsDomainPvUvDataWithOptions(request: DescribeVsDomainPvUvDataRequest, runtime: $RuntimeOptions): DescribeVsDomainPvUvDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsDomainPvUvData',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsDomainPvUvDataRequest
 * @return DescribeVsDomainPvUvDataResponse
 */
async function describeVsDomainPvUvData(request: DescribeVsDomainPvUvDataRequest): DescribeVsDomainPvUvDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsDomainPvUvDataWithOptions(request, runtime);
}

model DescribeVsDomainRecordDataRequest {
  domainName?: string(name='DomainName', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-11-19T15:59:59Z'),
  ownerId?: long(name='OwnerId'),
  region?: string(name='Region', example='cn-shanghai'),
  startTime?: string(name='StartTime', example='2021-09-29T16:00:00Z'),
}

model DescribeVsDomainRecordDataResponseBody = {
  recordDataPerInterval?: {
    dataModule?: [ 
    {
      recordValue?: string(name='RecordValue', example='100'),
      streamCountValue?: string(name='StreamCountValue', example='1'),
      timeStamp?: string(name='TimeStamp', example='2021-11-19T15:59:59Z'),
    }
  ](name='DataModule')
  }(name='RecordDataPerInterval'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DescribeVsDomainRecordDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsDomainRecordDataResponseBody(name='body'),
}

/**
 * @param request DescribeVsDomainRecordDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsDomainRecordDataResponse
 */
async function describeVsDomainRecordDataWithOptions(request: DescribeVsDomainRecordDataRequest, runtime: $RuntimeOptions): DescribeVsDomainRecordDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.region)) {
    query['Region'] = request.region;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsDomainRecordData',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsDomainRecordDataRequest
 * @return DescribeVsDomainRecordDataResponse
 */
async function describeVsDomainRecordData(request: DescribeVsDomainRecordDataRequest): DescribeVsDomainRecordDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsDomainRecordDataWithOptions(request, runtime);
}

model DescribeVsDomainRegionDataRequest {
  domainName?: string(name='DomainName', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-10-31T15:59:59Z'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime', example='2021-10-30T16:00:00Z'),
}

model DescribeVsDomainRegionDataResponseBody = {
  dataInterval?: string(name='DataInterval', example='3600'),
  domainName?: string(name='DomainName', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-10-31T15:59:59Z'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  startTime?: string(name='StartTime', example='2021-10-30T16:00:00Z'),
  value?: {
    regionProportionData?: [ 
    {
      avgObjectSize?: string(name='AvgObjectSize', example='2888253.7875'),
      avgResponseRate?: string(name='AvgResponseRate', example='154.3345765545624'),
      avgResponseTime?: string(name='AvgResponseTime', example='5183.666666666667'),
      bps?: string(name='Bps', example='380.9614285714286'),
      bytesProportion?: string(name='BytesProportion', example='0.003544181046236794'),
      proportion?: string(name='Proportion', example='0.01155980271270037'),
      qps?: string(name='Qps', example='0.001746031746031746'),
      region?: string(name='Region'),
      regionEname?: string(name='RegionEname', example='chongqing'),
      reqErrRate?: string(name='ReqErrRate', example='0'),
      totalBytes?: string(name='TotalBytes', example='2400057'),
      totalQuery?: string(name='TotalQuery', example='3'),
    }
  ](name='RegionProportionData')
  }(name='Value'),
}

model DescribeVsDomainRegionDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsDomainRegionDataResponseBody(name='body'),
}

/**
 * @param request DescribeVsDomainRegionDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsDomainRegionDataResponse
 */
async function describeVsDomainRegionDataWithOptions(request: DescribeVsDomainRegionDataRequest, runtime: $RuntimeOptions): DescribeVsDomainRegionDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsDomainRegionData',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsDomainRegionDataRequest
 * @return DescribeVsDomainRegionDataResponse
 */
async function describeVsDomainRegionData(request: DescribeVsDomainRegionDataRequest): DescribeVsDomainRegionDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsDomainRegionDataWithOptions(request, runtime);
}

model DescribeVsDomainReqBpsDataRequest {
  domainName?: string(name='DomainName', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-10-16T07:00:46Z'),
  interval?: string(name='Interval', example='300'),
  ispNameEn?: string(name='IspNameEn', example='telecom'),
  locationNameEn?: string(name='LocationNameEn', example='beijing'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime', example='2022-01-15T16:00:00Z'),
}

model DescribeVsDomainReqBpsDataResponseBody = {
  dataInterval?: string(name='DataInterval', example='3600'),
  domainName?: string(name='DomainName', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-09-24T03:30:46Z'),
  reqBpsDataPerInterval?: {
    dataModule?: [ 
    {
      reqBpsValue?: string(name='ReqBpsValue', example='1000'),
      timeStamp?: string(name='TimeStamp', example='2021-12-24T16:00:00Z'),
    }
  ](name='DataModule')
  }(name='ReqBpsDataPerInterval'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  startTime?: string(name='StartTime', example='2021-12-24T16:00:00Z'),
}

model DescribeVsDomainReqBpsDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsDomainReqBpsDataResponseBody(name='body'),
}

/**
 * @param request DescribeVsDomainReqBpsDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsDomainReqBpsDataResponse
 */
async function describeVsDomainReqBpsDataWithOptions(request: DescribeVsDomainReqBpsDataRequest, runtime: $RuntimeOptions): DescribeVsDomainReqBpsDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!$isNull(request.ispNameEn)) {
    query['IspNameEn'] = request.ispNameEn;
  }
  if (!$isNull(request.locationNameEn)) {
    query['LocationNameEn'] = request.locationNameEn;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsDomainReqBpsData',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsDomainReqBpsDataRequest
 * @return DescribeVsDomainReqBpsDataResponse
 */
async function describeVsDomainReqBpsData(request: DescribeVsDomainReqBpsDataRequest): DescribeVsDomainReqBpsDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsDomainReqBpsDataWithOptions(request, runtime);
}

model DescribeVsDomainReqTrafficDataRequest {
  domainName?: string(name='DomainName', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-10-13T10:00:41Z'),
  interval?: string(name='Interval', example='3600'),
  ispNameEn?: string(name='IspNameEn', example='unicom'),
  locationNameEn?: string(name='LocationNameEn', example='shanghai'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime', example='2021-09-30T16:00:00Z'),
}

model DescribeVsDomainReqTrafficDataResponseBody = {
  dataInterval?: string(name='DataInterval', example='3600'),
  domainName?: string(name='DomainName', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-09-22T03:40:41Z'),
  reqTrafficDataPerInterval?: {
    dataModule?: [ 
    {
      reqTrafficValue?: string(name='ReqTrafficValue', example='10000'),
      timeStamp?: string(name='TimeStamp', example='2021-09-22T03:40:41Z'),
    }
  ](name='DataModule')
  }(name='ReqTrafficDataPerInterval'),
  requestId?: string(name='RequestId', example='9BEC5E85-C76B-56EF-A922-860EFDB8B64B'),
  startTime?: string(name='StartTime', example='2021-09-21T16:00:00Z'),
}

model DescribeVsDomainReqTrafficDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsDomainReqTrafficDataResponseBody(name='body'),
}

/**
 * @param request DescribeVsDomainReqTrafficDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsDomainReqTrafficDataResponse
 */
async function describeVsDomainReqTrafficDataWithOptions(request: DescribeVsDomainReqTrafficDataRequest, runtime: $RuntimeOptions): DescribeVsDomainReqTrafficDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!$isNull(request.ispNameEn)) {
    query['IspNameEn'] = request.ispNameEn;
  }
  if (!$isNull(request.locationNameEn)) {
    query['LocationNameEn'] = request.locationNameEn;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsDomainReqTrafficData',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsDomainReqTrafficDataRequest
 * @return DescribeVsDomainReqTrafficDataResponse
 */
async function describeVsDomainReqTrafficData(request: DescribeVsDomainReqTrafficDataRequest): DescribeVsDomainReqTrafficDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsDomainReqTrafficDataWithOptions(request, runtime);
}

model DescribeVsDomainSnapshotDataRequest {
  domainName?: string(name='DomainName', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-10-18T16:00:00Z'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime', example='2021-10-05T16:00:00Z'),
}

model DescribeVsDomainSnapshotDataResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  snapshotDataPerInterval?: {
    dataModule?: [ 
    {
      snapshotValue?: string(name='SnapshotValue', example='1'),
      timeStamp?: string(name='TimeStamp', example='2015-12-10T20:00:00Z'),
    }
  ](name='DataModule')
  }(name='SnapshotDataPerInterval'),
}

model DescribeVsDomainSnapshotDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsDomainSnapshotDataResponseBody(name='body'),
}

/**
 * @param request DescribeVsDomainSnapshotDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsDomainSnapshotDataResponse
 */
async function describeVsDomainSnapshotDataWithOptions(request: DescribeVsDomainSnapshotDataRequest, runtime: $RuntimeOptions): DescribeVsDomainSnapshotDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsDomainSnapshotData',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsDomainSnapshotDataRequest
 * @return DescribeVsDomainSnapshotDataResponse
 */
async function describeVsDomainSnapshotData(request: DescribeVsDomainSnapshotDataRequest): DescribeVsDomainSnapshotDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsDomainSnapshotDataWithOptions(request, runtime);
}

model DescribeVsDomainTrafficDataRequest {
  domainName?: string(name='DomainName', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-09-21T02:50:42Z'),
  interval?: string(name='Interval', example='3600'),
  ispNameEn?: string(name='IspNameEn', example='telecom'),
  locationNameEn?: string(name='LocationNameEn', example='beijing'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime', example='2021-08-18T16:00:00Z'),
}

model DescribeVsDomainTrafficDataResponseBody = {
  dataInterval?: string(name='DataInterval', example='3600'),
  domainName?: string(name='DomainName', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-09-20T07:10:42Z'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  startTime?: string(name='StartTime', example='2021-10-25T16:00:00Z'),
  trafficDataPerInterval?: {
    dataModule?: [ 
    {
      timeStamp?: string(name='TimeStamp', example='2021-09-20T07:10:42Z'),
      trafficValue?: string(name='TrafficValue', example='100'),
    }
  ](name='DataModule')
  }(name='TrafficDataPerInterval'),
}

model DescribeVsDomainTrafficDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsDomainTrafficDataResponseBody(name='body'),
}

/**
 * @param request DescribeVsDomainTrafficDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsDomainTrafficDataResponse
 */
async function describeVsDomainTrafficDataWithOptions(request: DescribeVsDomainTrafficDataRequest, runtime: $RuntimeOptions): DescribeVsDomainTrafficDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!$isNull(request.ispNameEn)) {
    query['IspNameEn'] = request.ispNameEn;
  }
  if (!$isNull(request.locationNameEn)) {
    query['LocationNameEn'] = request.locationNameEn;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsDomainTrafficData',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsDomainTrafficDataRequest
 * @return DescribeVsDomainTrafficDataResponse
 */
async function describeVsDomainTrafficData(request: DescribeVsDomainTrafficDataRequest): DescribeVsDomainTrafficDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsDomainTrafficDataWithOptions(request, runtime);
}

model DescribeVsDomainUvDataRequest {
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2021-11-24T00:00:00Z'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime', example='2021-10-12T10:00:00Z'),
}

model DescribeVsDomainUvDataResponseBody = {
  dataInterval?: string(name='DataInterval', example='3600'),
  domainName?: string(name='DomainName', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2015-11-30T00:00:00Z'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  startTime?: string(name='StartTime', example='2015-11-29T00:00:00Z'),
  uvDataInterval?: {
    usageData?: [ 
    {
      timeStamp?: string(name='TimeStamp', example='2015-11-29T15:00:00Z'),
      value?: string(name='Value', example='100'),
    }
  ](name='UsageData')
  }(name='UvDataInterval'),
}

model DescribeVsDomainUvDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsDomainUvDataResponseBody(name='body'),
}

/**
 * @param request DescribeVsDomainUvDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsDomainUvDataResponse
 */
async function describeVsDomainUvDataWithOptions(request: DescribeVsDomainUvDataRequest, runtime: $RuntimeOptions): DescribeVsDomainUvDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsDomainUvData',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsDomainUvDataRequest
 * @return DescribeVsDomainUvDataResponse
 */
async function describeVsDomainUvData(request: DescribeVsDomainUvDataRequest): DescribeVsDomainUvDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsDomainUvDataWithOptions(request, runtime);
}

model DescribeVsPullStreamInfoConfigRequest {
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.com'),
  ownerId?: long(name='OwnerId'),
}

model DescribeVsPullStreamInfoConfigResponseBody = {
  liveAppRecordList?: {
    liveAppRecord?: [ 
    {
      appName?: string(name='AppName', example='xxxApp'),
      domainName?: string(name='DomainName', example='example.com'),
      endTime?: string(name='EndTime', example='2016-05-15T07:30:00Z'),
      sourceUrl?: string(name='SourceUrl', example='http://test'),
      startTime?: string(name='StartTime', example='2016-05-15T01:30:00Z'),
      streamName?: string(name='StreamName', example='xxxStream'),
    }
  ](name='LiveAppRecord')
  }(name='LiveAppRecordList'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DescribeVsPullStreamInfoConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsPullStreamInfoConfigResponseBody(name='body'),
}

/**
 * @param request DescribeVsPullStreamInfoConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsPullStreamInfoConfigResponse
 */
async function describeVsPullStreamInfoConfigWithOptions(request: DescribeVsPullStreamInfoConfigRequest, runtime: $RuntimeOptions): DescribeVsPullStreamInfoConfigResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsPullStreamInfoConfig',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsPullStreamInfoConfigRequest
 * @return DescribeVsPullStreamInfoConfigResponse
 */
async function describeVsPullStreamInfoConfig(request: DescribeVsPullStreamInfoConfigRequest): DescribeVsPullStreamInfoConfigResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsPullStreamInfoConfigWithOptions(request, runtime);
}

model DescribeVsStreamsNotifyUrlConfigRequest {
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.aliyundoc.com'),
  ownerId?: long(name='OwnerId'),
}

model DescribeVsStreamsNotifyUrlConfigResponseBody = {
  liveStreamsNotifyConfig?: {
    authKey?: string(name='AuthKey'),
    authType?: string(name='AuthType'),
    domainName?: string(name='DomainName', example='example.aliyundoc.com'),
    notifyUrl?: string(name='NotifyUrl'),
  }(name='LiveStreamsNotifyConfig'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DescribeVsStreamsNotifyUrlConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsStreamsNotifyUrlConfigResponseBody(name='body'),
}

/**
 * @param request DescribeVsStreamsNotifyUrlConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsStreamsNotifyUrlConfigResponse
 */
async function describeVsStreamsNotifyUrlConfigWithOptions(request: DescribeVsStreamsNotifyUrlConfigRequest, runtime: $RuntimeOptions): DescribeVsStreamsNotifyUrlConfigResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsStreamsNotifyUrlConfig',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsStreamsNotifyUrlConfigRequest
 * @return DescribeVsStreamsNotifyUrlConfigResponse
 */
async function describeVsStreamsNotifyUrlConfig(request: DescribeVsStreamsNotifyUrlConfigRequest): DescribeVsStreamsNotifyUrlConfigResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsStreamsNotifyUrlConfigWithOptions(request, runtime);
}

model DescribeVsStreamsOnlineListRequest {
  appName?: string(name='AppName', example='xxxApp'),
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.com'),
  endTime?: string(name='EndTime', example='2016-06-30T19:00:00Z'),
  orderBy?: string(name='OrderBy', example='publish_time_asc'),
  ownerId?: long(name='OwnerId'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  queryType?: string(name='QueryType', example='fuzzy'),
  startTime?: string(name='StartTime', example='2016-06-29T19:00:00Z'),
  streamName?: string(name='StreamName', example='xxxStream'),
  streamType?: string(name='StreamType', example='all'),
}

model DescribeVsStreamsOnlineListResponseBody = {
  onlineInfo?: {
    liveStreamOnlineInfo?: [ 
    {
      appName?: string(name='AppName', example='xxxApp'),
      domainName?: string(name='DomainName', example='example.com'),
      publishDomain?: string(name='PublishDomain', example='push.example.com'),
      publishTime?: string(name='PublishTime', example='2015-12-02T06:58:04Z'),
      publishType?: string(name='PublishType', example='edge'),
      publishUrl?: string(name='PublishUrl', example='rtmp://example.com/xchen'),
      streamName?: string(name='StreamName', example='testxchen_small'),
      transcodeId?: string(name='TranscodeId', example='123'),
      transcoded?: string(name='Transcoded', example='no'),
    }
  ](name='LiveStreamOnlineInfo')
  }(name='OnlineInfo'),
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='B31FC4AD-3592-573E-8063-878F722B322A'),
  totalNum?: int32(name='TotalNum', example='10'),
  totalPage?: int32(name='TotalPage', example='1'),
}

model DescribeVsStreamsOnlineListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsStreamsOnlineListResponseBody(name='body'),
}

/**
 * @param request DescribeVsStreamsOnlineListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsStreamsOnlineListResponse
 */
async function describeVsStreamsOnlineListWithOptions(request: DescribeVsStreamsOnlineListRequest, runtime: $RuntimeOptions): DescribeVsStreamsOnlineListResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNum)) {
    query['PageNum'] = request.pageNum;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.queryType)) {
    query['QueryType'] = request.queryType;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!$isNull(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  if (!$isNull(request.streamType)) {
    query['StreamType'] = request.streamType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsStreamsOnlineList',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsStreamsOnlineListRequest
 * @return DescribeVsStreamsOnlineListResponse
 */
async function describeVsStreamsOnlineList(request: DescribeVsStreamsOnlineListRequest): DescribeVsStreamsOnlineListResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsStreamsOnlineListWithOptions(request, runtime);
}

model DescribeVsStreamsPublishListRequest {
  appName?: string(name='AppName', example='xxxApp'),
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', description='This parameter is required.', example='2016-06-30T19:00:00Z'),
  orderBy?: string(name='OrderBy', example='publish_time_asc'),
  ownerId?: long(name='OwnerId'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='3000'),
  queryType?: string(name='QueryType', example='fuzzy'),
  startTime?: string(name='StartTime', description='This parameter is required.', example='2016-06-29T19:00:00Z'),
  streamName?: string(name='StreamName', example='xxxStream'),
  streamType?: string(name='StreamType', example='all'),
}

model DescribeVsStreamsPublishListResponseBody = {
  pageNum?: int32(name='PageNum', example='1'),
  pageSize?: int32(name='PageSize', example='3000'),
  publishInfo?: {
    liveStreamPublishInfo?: [ 
    {
      appName?: string(name='AppName', example='xxxApp'),
      clientAddr?: string(name='ClientAddr', example='192.168.0.1'),
      domainName?: string(name='DomainName', example='example.aliyundoc.com'),
      edgeNodeAddr?: string(name='EdgeNodeAddr', example='192.168.0.1'),
      publishDomain?: string(name='PublishDomain', example='example.aliyundoc.com'),
      publishTime?: string(name='PublishTime', example='2016-06-29T19:00:00Z'),
      publishType?: string(name='PublishType', example='center'),
      publishUrl?: string(name='PublishUrl', example='https://example.aliyundoc.com/xxxApp/3402000****320000001.m3u8'),
      stopTime?: string(name='StopTime', example='2016-06-29T19:00:00Z'),
      streamName?: string(name='StreamName', example='xxxStream'),
      streamUrl?: string(name='StreamUrl', example='https://example.aliyundoc.com/xxxApp/3402000****320000001.m3u8'),
      transcodeId?: string(name='TranscodeId', example='3888920****8138204-cn-qingdao'),
      transcoded?: string(name='Transcoded', example='yes'),
    }
  ](name='LiveStreamPublishInfo')
  }(name='PublishInfo'),
  requestId?: string(name='RequestId', example='119F7639-4646-51A4-B6C1-300D391C0104'),
  totalNum?: int32(name='TotalNum', example='200'),
  totalPage?: int32(name='TotalPage', example='1'),
}

model DescribeVsStreamsPublishListResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsStreamsPublishListResponseBody(name='body'),
}

/**
 * @param request DescribeVsStreamsPublishListRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsStreamsPublishListResponse
 */
async function describeVsStreamsPublishListWithOptions(request: DescribeVsStreamsPublishListRequest, runtime: $RuntimeOptions): DescribeVsStreamsPublishListResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.orderBy)) {
    query['OrderBy'] = request.orderBy;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.queryType)) {
    query['QueryType'] = request.queryType;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!$isNull(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  if (!$isNull(request.streamType)) {
    query['StreamType'] = request.streamType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsStreamsPublishList',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsStreamsPublishListRequest
 * @return DescribeVsStreamsPublishListResponse
 */
async function describeVsStreamsPublishList(request: DescribeVsStreamsPublishListRequest): DescribeVsStreamsPublishListResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsStreamsPublishListWithOptions(request, runtime);
}

model DescribeVsTopDomainsByFlowRequest {
  endTime?: string(name='EndTime', example='2018-12-10T18:00:00Z'),
  limit?: long(name='Limit', example='3'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime', example='2021-12-12T10:00:00Z'),
}

model DescribeVsTopDomainsByFlowResponseBody = {
  domainCount?: long(name='DomainCount', example='20'),
  domainOnlineCount?: long(name='DomainOnlineCount', example='12'),
  endTime?: string(name='EndTime', example='2018-12-10T18:00:00Z'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  startTime?: string(name='StartTime', example='2021-12-10T10:00:00Z'),
  topDomains?: {
    topDomain?: [ 
    {
      domainName?: string(name='DomainName', example='example.aliyundoc.com'),
      maxBps?: long(name='MaxBps', example='100'),
      maxBpsTime?: string(name='MaxBpsTime', example='1457111400'),
      rank?: long(name='Rank', example='1'),
      totalAccess?: long(name='TotalAccess', example='100'),
      totalTraffic?: string(name='TotalTraffic', example='100'),
      trafficPercent?: string(name='TrafficPercent', example='30.64191989360235'),
    }
  ](name='TopDomain')
  }(name='TopDomains'),
}

model DescribeVsTopDomainsByFlowResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsTopDomainsByFlowResponseBody(name='body'),
}

/**
 * @param request DescribeVsTopDomainsByFlowRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsTopDomainsByFlowResponse
 */
async function describeVsTopDomainsByFlowWithOptions(request: DescribeVsTopDomainsByFlowRequest, runtime: $RuntimeOptions): DescribeVsTopDomainsByFlowResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.limit)) {
    query['Limit'] = request.limit;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsTopDomainsByFlow',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsTopDomainsByFlowRequest
 * @return DescribeVsTopDomainsByFlowResponse
 */
async function describeVsTopDomainsByFlow(request: DescribeVsTopDomainsByFlowRequest): DescribeVsTopDomainsByFlowResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsTopDomainsByFlowWithOptions(request, runtime);
}

model DescribeVsUpPeakPublishStreamDataRequest {
  domainName?: string(name='DomainName', example='example.com'),
  domainSwitch?: string(name='DomainSwitch', example='on'),
  endTime?: string(name='EndTime', description='This parameter is required.', example='2017-12-10T21:00:00Z'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime', description='This parameter is required.', example='2017-12-10T20:00:00Z'),
}

model DescribeVsUpPeakPublishStreamDataResponseBody = {
  describeVsUpPeakPublishStreamDatas?: {
    describeVsUpPeakPublishStreamData?: [ 
    {
      bandWidth?: string(name='BandWidth'),
      peakTime?: string(name='PeakTime', example='1522252320000'),
      publishStreamNum?: int32(name='PublishStreamNum', example='31'),
      queryTime?: string(name='QueryTime', example='1522166400000'),
      statName?: string(name='StatName', example='example.com'),
    }
  ](name='DescribeVsUpPeakPublishStreamData')
  }(name='DescribeVsUpPeakPublishStreamDatas'),
  requestId?: string(name='RequestId', example='27A3C548-A699-48F9-97CD-F35D81075AF3'),
}

model DescribeVsUpPeakPublishStreamDataResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsUpPeakPublishStreamDataResponseBody(name='body'),
}

/**
 * @param request DescribeVsUpPeakPublishStreamDataRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsUpPeakPublishStreamDataResponse
 */
async function describeVsUpPeakPublishStreamDataWithOptions(request: DescribeVsUpPeakPublishStreamDataRequest, runtime: $RuntimeOptions): DescribeVsUpPeakPublishStreamDataResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.domainSwitch)) {
    query['DomainSwitch'] = request.domainSwitch;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsUpPeakPublishStreamData',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsUpPeakPublishStreamDataRequest
 * @return DescribeVsUpPeakPublishStreamDataResponse
 */
async function describeVsUpPeakPublishStreamData(request: DescribeVsUpPeakPublishStreamDataRequest): DescribeVsUpPeakPublishStreamDataResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsUpPeakPublishStreamDataWithOptions(request, runtime);
}

model DescribeVsUserResourcePackageRequest {
  ownerId?: long(name='OwnerId'),
  securityToken?: string(name='SecurityToken'),
}

model DescribeVsUserResourcePackageResponseBody = {
  requestId?: string(name='RequestId'),
  resourcePackageInfos?: {
    resourcePackageInfo?: [ 
    {
      commodityCode?: string(name='CommodityCode'),
      currCapacity?: string(name='CurrCapacity'),
      displayName?: string(name='DisplayName'),
      initCapacity?: string(name='InitCapacity'),
      instanceId?: string(name='InstanceId'),
      status?: string(name='Status'),
    }
  ](name='ResourcePackageInfo')
  }(name='ResourcePackageInfos'),
}

model DescribeVsUserResourcePackageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsUserResourcePackageResponseBody(name='body'),
}

/**
 * @param request DescribeVsUserResourcePackageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsUserResourcePackageResponse
 */
async function describeVsUserResourcePackageWithOptions(request: DescribeVsUserResourcePackageRequest, runtime: $RuntimeOptions): DescribeVsUserResourcePackageResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.securityToken)) {
    query['SecurityToken'] = request.securityToken;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsUserResourcePackage',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsUserResourcePackageRequest
 * @return DescribeVsUserResourcePackageResponse
 */
async function describeVsUserResourcePackage(request: DescribeVsUserResourcePackageRequest): DescribeVsUserResourcePackageResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsUserResourcePackageWithOptions(request, runtime);
}

model DescribeVsVerifyContentRequest {
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.aliyundoc.com'),
  ownerId?: long(name='OwnerId'),
}

model DescribeVsVerifyContentResponseBody = {
  content?: string(name='Content', example='verify_dffeb6610035dcb77b413a59c3*****'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model DescribeVsVerifyContentResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: DescribeVsVerifyContentResponseBody(name='body'),
}

/**
 * @param request DescribeVsVerifyContentRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return DescribeVsVerifyContentResponse
 */
async function describeVsVerifyContentWithOptions(request: DescribeVsVerifyContentRequest, runtime: $RuntimeOptions): DescribeVsVerifyContentResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'DescribeVsVerifyContent',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request DescribeVsVerifyContentRequest
 * @return DescribeVsVerifyContentResponse
 */
async function describeVsVerifyContent(request: DescribeVsVerifyContentRequest): DescribeVsVerifyContentResponse {
  var runtime = new $RuntimeOptions{};
  return describeVsVerifyContentWithOptions(request, runtime);
}

model ForbidVsStreamRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='xxxApp'),
  controlStreamAction?: string(name='ControlStreamAction'),
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.aliyundoc.com'),
  liveStreamType?: string(name='LiveStreamType', description='This parameter is required.', example='publisher'),
  oneshot?: string(name='Oneshot', example='yes'),
  ownerId?: long(name='OwnerId'),
  resumeTime?: string(name='ResumeTime', example='2015-12-01T17:37:00Z'),
  streamName?: string(name='StreamName', description='This parameter is required.', example='xxxStream'),
}

model ForbidVsStreamResponseBody = {
  requestId?: string(name='RequestId', example='119F7639-4646-51A4-B6C1-300D391C0104'),
}

model ForbidVsStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ForbidVsStreamResponseBody(name='body'),
}

/**
 * @param request ForbidVsStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ForbidVsStreamResponse
 */
async function forbidVsStreamWithOptions(request: ForbidVsStreamRequest, runtime: $RuntimeOptions): ForbidVsStreamResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!$isNull(request.controlStreamAction)) {
    query['ControlStreamAction'] = request.controlStreamAction;
  }
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.liveStreamType)) {
    query['LiveStreamType'] = request.liveStreamType;
  }
  if (!$isNull(request.oneshot)) {
    query['Oneshot'] = request.oneshot;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.resumeTime)) {
    query['ResumeTime'] = request.resumeTime;
  }
  if (!$isNull(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ForbidVsStream',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ForbidVsStreamRequest
 * @return ForbidVsStreamResponse
 */
async function forbidVsStream(request: ForbidVsStreamRequest): ForbidVsStreamResponse {
  var runtime = new $RuntimeOptions{};
  return forbidVsStreamWithOptions(request, runtime);
}

model GetRenderingInstanceStreamingInfoRequest {
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model GetRenderingInstanceStreamingInfoResponseBody = {
  flowId?: string(name='FlowId', example='792fy125-594c-4dde-ab35-9ff8hrf0a86f'),
  gateway?: string(name='Gateway', example='10.178.208.22'),
  hostname?: string(name='Hostname', example='10.18.20.2'),
  port?: string(name='Port', example='10003'),
  renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model GetRenderingInstanceStreamingInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GetRenderingInstanceStreamingInfoResponseBody(name='body'),
}

/**
 * @summary 获取云渲染实例流连接信息，每次流化建联前都需要调用此接口获取最新连接信息
 *
 * @param request GetRenderingInstanceStreamingInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GetRenderingInstanceStreamingInfoResponse
 */
async function getRenderingInstanceStreamingInfoWithOptions(request: GetRenderingInstanceStreamingInfoRequest, runtime: $RuntimeOptions): GetRenderingInstanceStreamingInfoResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GetRenderingInstanceStreamingInfo',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 获取云渲染实例流连接信息，每次流化建联前都需要调用此接口获取最新连接信息
 *
 * @param request GetRenderingInstanceStreamingInfoRequest
 * @return GetRenderingInstanceStreamingInfoResponse
 */
async function getRenderingInstanceStreamingInfo(request: GetRenderingInstanceStreamingInfoRequest): GetRenderingInstanceStreamingInfoResponse {
  var runtime = new $RuntimeOptions{};
  return getRenderingInstanceStreamingInfoWithOptions(request, runtime);
}

model GotoPresetRequest {
  id?: string(name='Id', description='This parameter is required.', example='348*****380-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  presetId?: string(name='PresetId', description='This parameter is required.', example='2'),
}

model GotoPresetResponseBody = {
  id?: string(name='Id', example='348*****380-cn-qingdao'),
  requestId?: string(name='RequestId', example='30295DF1-1DC7-48BA-BE5A-D58E61EB2375'),
}

model GotoPresetResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: GotoPresetResponseBody(name='body'),
}

/**
 * @param request GotoPresetRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return GotoPresetResponse
 */
async function gotoPresetWithOptions(request: GotoPresetRequest, runtime: $RuntimeOptions): GotoPresetResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.presetId)) {
    query['PresetId'] = request.presetId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'GotoPreset',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request GotoPresetRequest
 * @return GotoPresetResponse
 */
async function gotoPreset(request: GotoPresetRequest): GotoPresetResponse {
  var runtime = new $RuntimeOptions{};
  return gotoPresetWithOptions(request, runtime);
}

model InstallCloudAppRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='cap-b06b26edfhytbn b94a75ae1a79efc90eb'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model InstallCloudAppResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model InstallCloudAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: InstallCloudAppResponseBody(name='body'),
}

/**
 * @summary 安装云应用
 *
 * @param request InstallCloudAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return InstallCloudAppResponse
 */
async function installCloudAppWithOptions(request: InstallCloudAppRequest, runtime: $RuntimeOptions): InstallCloudAppResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'InstallCloudApp',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 安装云应用
 *
 * @param request InstallCloudAppRequest
 * @return InstallCloudAppResponse
 */
async function installCloudApp(request: InstallCloudAppRequest): InstallCloudAppResponse {
  var runtime = new $RuntimeOptions{};
  return installCloudAppWithOptions(request, runtime);
}

model ListCloudAppInstallationsRequest {
  appId?: string(name='AppId', example='cap-b06b26edfhytbn b94a75ae1a79efc90eb'),
  appName?: string(name='AppName', example='com.aaa.bbb'),
  appVersion?: string(name='AppVersion', example='1.0'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model ListCloudAppInstallationsResponseBody = {
  installationInfos?: [ 
    {
      appId?: string(name='AppId', example='cap-b06b26edfhytbn b94a75ae1a79efc90eb'),
      appName?: string(name='AppName', example='com.aaa.bbb'),
      appVersion?: string(name='AppVersion', example='1.5.0'),
      installationTime?: string(name='InstallationTime', example='2024-05-28T14:48:34+08:00'),
      renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
      status?: string(name='Status', example='installed'),
      statusDescription?: string(name='StatusDescription', example='install success'),
      updateTime?: string(name='UpdateTime', example='2024-05-28T14:50:04+08:00'),
    }
  ](name='InstallationInfos'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  totalCount?: long(name='TotalCount', example='100'),
}

model ListCloudAppInstallationsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListCloudAppInstallationsResponseBody(name='body'),
}

/**
 * @summary 查询云应用安装信息列表
 *
 * @param request ListCloudAppInstallationsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListCloudAppInstallationsResponse
 */
async function listCloudAppInstallationsWithOptions(request: ListCloudAppInstallationsRequest, runtime: $RuntimeOptions): ListCloudAppInstallationsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListCloudAppInstallations',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询云应用安装信息列表
 *
 * @param request ListCloudAppInstallationsRequest
 * @return ListCloudAppInstallationsResponse
 */
async function listCloudAppInstallations(request: ListCloudAppInstallationsRequest): ListCloudAppInstallationsResponse {
  var runtime = new $RuntimeOptions{};
  return listCloudAppInstallationsWithOptions(request, runtime);
}

model ListCloudAppsRequest {
  appId?: string(name='AppId', example='cap-b06b26edfhytbn b94a75ae1a79efc90eb'),
  appName?: string(name='AppName', example='com.aaa.bbb'),
  appVersion?: string(name='AppVersion', example='1.0'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
}

model ListCloudAppsResponseBody = {
  cloudApps?: [ 
    {
      appId?: string(name='AppId', example='cap-b06b26edfhytbn b94a75ae1a79efc90eb'),
      appName?: string(name='AppName', example='com.aaa.bbb'),
      appVersion?: string(name='AppVersion', example='1.5.0'),
      description?: string(name='Description', example='demo'),
      status?: string(name='Status', example='Success'),
      statusDescription?: string(name='StatusDescription', example='upload success'),
      updateTime?: string(name='UpdateTime', example='2024-05-28T14:48:34+08:00'),
      uploadTime?: string(name='UploadTime', example='2024-05-28T14:28:14+08:00'),
    }
  ](name='CloudApps'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  totalCount?: long(name='TotalCount', example='100'),
}

model ListCloudAppsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListCloudAppsResponseBody(name='body'),
}

/**
 * @summary 查询云应用列表
 *
 * @param request ListCloudAppsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListCloudAppsResponse
 */
async function listCloudAppsWithOptions(request: ListCloudAppsRequest, runtime: $RuntimeOptions): ListCloudAppsResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListCloudApps',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询云应用列表
 *
 * @param request ListCloudAppsRequest
 * @return ListCloudAppsResponse
 */
async function listCloudApps(request: ListCloudAppsRequest): ListCloudAppsResponse {
  var runtime = new $RuntimeOptions{};
  return listCloudAppsWithOptions(request, runtime);
}

model ListFilePushStatusesRequest {
  fileId?: string(name='FileId', example='f-1671accd4dafdag3er256cvgewt13f7141db2f7'),
  fileName?: string(name='FileName', example='myfile'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model ListFilePushStatusesResponseBody = {
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  pushStatuses?: [ 
    {
      fileId?: string(name='FileId', example='f-1671accd4dafdag3er256cvgewt13f7141db2f7'),
      fileName?: string(name='FileName', example='myfile'),
      pushTime?: string(name='PushTime', example='2024-03-26T16:32:20+08:00'),
      renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
      status?: string(name='Status', example='Success'),
      statusDescription?: string(name='StatusDescription', example='push success'),
      updateTime?: string(name='UpdateTime', example='2024-03-26T17:02:10+08:00'),
    }
  ](name='PushStatuses'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  totalCount?: long(name='TotalCount', example='100'),
}

model ListFilePushStatusesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListFilePushStatusesResponseBody(name='body'),
}

/**
 * @summary 查询文件的实例推送状态信息列表。
 *
 * @param request ListFilePushStatusesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListFilePushStatusesResponse
 */
async function listFilePushStatusesWithOptions(request: ListFilePushStatusesRequest, runtime: $RuntimeOptions): ListFilePushStatusesResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListFilePushStatuses',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询文件的实例推送状态信息列表。
 *
 * @param request ListFilePushStatusesRequest
 * @return ListFilePushStatusesResponse
 */
async function listFilePushStatuses(request: ListFilePushStatusesRequest): ListFilePushStatusesResponse {
  var runtime = new $RuntimeOptions{};
  return listFilePushStatusesWithOptions(request, runtime);
}

model ListFilesRequest {
  fileId?: string(name='FileId', example='f-1671accd4dafdag3er256cvgewt13f7141db2f7'),
  fileName?: string(name='FileName', example='myfile'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
}

model ListFilesResponseBody = {
  files?: [ 
    {
      description?: string(name='Description'),
      fileId?: string(name='FileId', example='f-1671accd4dafdag3er256cvgewt13f7141db2f7'),
      fileName?: string(name='FileName', example='myfile'),
      status?: string(name='Status', example='Success'),
      statusDescription?: string(name='StatusDescription', example='upload success'),
      targetPath?: string(name='TargetPath', example='/data/tmp/test/xxx.tar'),
      updateTime?: string(name='UpdateTime', example='2024-03-28T14:15:08+08:00'),
      uploadTime?: string(name='UploadTime', example='2024-03-28T14:10:12+08:00'),
    }
  ](name='Files'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  totalCount?: long(name='TotalCount', example='200'),
}

model ListFilesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListFilesResponseBody(name='body'),
}

/**
 * @summary 查询可用文件列表。
 *
 * @param request ListFilesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListFilesResponse
 */
async function listFilesWithOptions(request: ListFilesRequest, runtime: $RuntimeOptions): ListFilesResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListFiles',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询可用文件列表。
 *
 * @param request ListFilesRequest
 * @return ListFilesResponse
 */
async function listFiles(request: ListFilesRequest): ListFilesResponse {
  var runtime = new $RuntimeOptions{};
  return listFilesWithOptions(request, runtime);
}

model ListPublicKeysRequest {
  keyGroup?: string(name='KeyGroup', example='g-test'),
  keyName?: string(name='KeyName', example='mykey'),
  keyType?: string(name='KeyType'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
}

model ListPublicKeysResponseBody = {
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  publicKeys?: [ 
    {
      content?: string(name='Content', example='verify_30d89ccb0905c8c7882c1d14a991954b'),
      description?: string(name='Description'),
      keyGroup?: string(name='KeyGroup', example='mygroup'),
      keyName?: string(name='KeyName', example='mykey'),
      keyType?: string(name='KeyType'),
      uploadTime?: string(name='UploadTime', example='2024-06-11T14:26:48+08:00'),
    }
  ](name='PublicKeys'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  totalCount?: long(name='TotalCount', example='100'),
}

model ListPublicKeysResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListPublicKeysResponseBody(name='body'),
}

/**
 * @summary 查询公钥信息
 *
 * @param request ListPublicKeysRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListPublicKeysResponse
 */
async function listPublicKeysWithOptions(request: ListPublicKeysRequest, runtime: $RuntimeOptions): ListPublicKeysResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListPublicKeys',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询公钥信息
 *
 * @param request ListPublicKeysRequest
 * @return ListPublicKeysResponse
 */
async function listPublicKeys(request: ListPublicKeysRequest): ListPublicKeysResponse {
  var runtime = new $RuntimeOptions{};
  return listPublicKeysWithOptions(request, runtime);
}

model ListRenderingDataPackagesRequest {
  category?: string(name='Category'),
  dataPackageId?: string(name='DataPackageId', example='dp-449ea3d16c0841b8bf33ec5bbc86a152'),
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  size?: int32(name='Size', example='20'),
  status?: string(name='Status', example='available'),
}

model ListRenderingDataPackagesResponseBody = {
  dataPackages?: [ 
    {
      category?: string(name='Category'),
      creationTime?: string(name='CreationTime', example='2024-10-15T10:23:06+08:00'),
      dataPackageId?: string(name='DataPackageId', example='dp-449ea3d16c0841b8bf33ec5bbc86a152'),
      description?: string(name='Description', example='test'),
      renderingInstanceId?: string(name='RenderingInstanceId', example='render-342012a227dc4ddf91f024639e43051a'),
      size?: int32(name='Size', example='10'),
      status?: string(name='Status', example='available'),
      updateTime?: string(name='UpdateTime', example='2024-12-06T02:03:59Z'),
    }
  ](name='DataPackages'),
  requestId?: string(name='RequestId', description='Id of the request', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  totalCount?: long(name='TotalCount', example='100'),
}

model ListRenderingDataPackagesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListRenderingDataPackagesResponseBody(name='body'),
}

/**
 * @summary 查询所有云应用数据包信息，支持分页查询。
 *
 * @param request ListRenderingDataPackagesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListRenderingDataPackagesResponse
 */
async function listRenderingDataPackagesWithOptions(request: ListRenderingDataPackagesRequest, runtime: $RuntimeOptions): ListRenderingDataPackagesResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.category)) {
    query['Category'] = request.category;
  }
  if (!$isNull(request.dataPackageId)) {
    query['DataPackageId'] = request.dataPackageId;
  }
  if (!$isNull(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.size)) {
    query['Size'] = request.size;
  }
  if (!$isNull(request.status)) {
    query['Status'] = request.status;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListRenderingDataPackages',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询所有云应用数据包信息，支持分页查询。
 *
 * @param request ListRenderingDataPackagesRequest
 * @return ListRenderingDataPackagesResponse
 */
async function listRenderingDataPackages(request: ListRenderingDataPackagesRequest): ListRenderingDataPackagesResponse {
  var runtime = new $RuntimeOptions{};
  return listRenderingDataPackagesWithOptions(request, runtime);
}

model ListRenderingInstanceGatewayRequest {
  gatewayInstanceId?: string(name='GatewayInstanceId', example='render-xxx'),
  pageNumber?: long(name='PageNumber', example='1'),
  pageSize?: long(name='PageSize', example='10'),
  renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model ListRenderingInstanceGatewayResponseBody = {
  gatewayConfigurationInfos?: [ 
    {
      creationTime?: string(name='CreationTime', example='2024-10-15 10:19:13'),
      gatewayInstanceId?: string(name='GatewayInstanceId', example='render-xxx'),
      renderingInstanceId?: string(name='RenderingInstanceId', example='render-342012a227dc4ddf91f024639e43051a'),
      status?: string(name='Status', example='available'),
      updateTime?: string(name='UpdateTime', example='2024-11-02 12:08:26'),
    }
  ](name='GatewayConfigurationInfos'),
  pageNumber?: string(name='PageNumber', example='1'),
  pageSize?: string(name='PageSize', example='10'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  totalCount?: string(name='TotalCount', example='100'),
}

model ListRenderingInstanceGatewayResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListRenderingInstanceGatewayResponseBody(name='body'),
}

/**
 * @summary 查询自定义网关
 *
 * @param request ListRenderingInstanceGatewayRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListRenderingInstanceGatewayResponse
 */
async function listRenderingInstanceGatewayWithOptions(request: ListRenderingInstanceGatewayRequest, runtime: $RuntimeOptions): ListRenderingInstanceGatewayResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.gatewayInstanceId)) {
    query['GatewayInstanceId'] = request.gatewayInstanceId;
  }
  if (!$isNull(request.pageNumber)) {
    query['PageNumber'] = request.pageNumber;
  }
  if (!$isNull(request.pageSize)) {
    query['PageSize'] = request.pageSize;
  }
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListRenderingInstanceGateway',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询自定义网关
 *
 * @param request ListRenderingInstanceGatewayRequest
 * @return ListRenderingInstanceGatewayResponse
 */
async function listRenderingInstanceGateway(request: ListRenderingInstanceGatewayRequest): ListRenderingInstanceGatewayResponse {
  var runtime = new $RuntimeOptions{};
  return listRenderingInstanceGatewayWithOptions(request, runtime);
}

model ListRenderingInstancesRequest {
  pageNumber?: int32(name='PageNumber', example='1'),
  pageSize?: int32(name='PageSize', example='10'),
  renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
  renderingSpec?: string(name='RenderingSpec', example='crs.cp.l1'),
  storageSize?: int32(name='StorageSize'),
}

model ListRenderingInstancesResponseBody = {
  renderingInstances?: [ 
    {
      creationTime?: string(name='CreationTime', example='2023-11-17T02:18:04Z'),
      renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
      renderingSpec?: string(name='RenderingSpec', example='crs.cp.l1'),
      storageSize?: int32(name='StorageSize'),
    }
  ](name='RenderingInstances'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  totalCount?: long(name='TotalCount', example='100'),
}

model ListRenderingInstancesResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ListRenderingInstancesResponseBody(name='body'),
}

/**
 * @summary 查询所有云渲染实例信息，支持分页查询。
 *
 * @param request ListRenderingInstancesRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ListRenderingInstancesResponse
 */
async function listRenderingInstancesWithOptions(request: ListRenderingInstancesRequest, runtime: $RuntimeOptions): ListRenderingInstancesResponse {
  request.validate();
  var query = OpenApiUtil.query(request.toMap());
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ListRenderingInstances',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'GET',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 查询所有云渲染实例信息，支持分页查询。
 *
 * @param request ListRenderingInstancesRequest
 * @return ListRenderingInstancesResponse
 */
async function listRenderingInstances(request: ListRenderingInstancesRequest): ListRenderingInstancesResponse {
  var runtime = new $RuntimeOptions{};
  return listRenderingInstancesWithOptions(request, runtime);
}

model ManageLoginRequest {
  actionName?: string(name='ActionName', example='open'),
  keyGroup?: string(name='KeyGroup', example='mygroup'),
  keyName?: string(name='KeyName', example='mykey'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model ManageLoginResponseBody = {
  loginInfo?: {
    adbLoginPort?: int32(name='AdbLoginPort'),
    loginHostname?: string(name='LoginHostname', example='12.10.4.10'),
    loginPort?: int32(name='LoginPort', example='10004'),
  }(name='LoginInfo'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model ManageLoginResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ManageLoginResponseBody(name='body'),
}

/**
 * @summary 安全登陆管理
 *
 * @param request ManageLoginRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ManageLoginResponse
 */
async function manageLoginWithOptions(request: ManageLoginRequest, runtime: $RuntimeOptions): ManageLoginResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.actionName)) {
    query['ActionName'] = request.actionName;
  }
  if (!$isNull(request.keyGroup)) {
    query['KeyGroup'] = request.keyGroup;
  }
  if (!$isNull(request.keyName)) {
    query['KeyName'] = request.keyName;
  }
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ManageLogin',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 安全登陆管理
 *
 * @param request ManageLoginRequest
 * @return ManageLoginResponse
 */
async function manageLogin(request: ManageLoginRequest): ManageLoginResponse {
  var runtime = new $RuntimeOptions{};
  return manageLoginWithOptions(request, runtime);
}

model ModifyDeviceRequest {
  alarmMethod?: string(name='AlarmMethod', example='0'),
  autoDirectory?: boolean(name='AutoDirectory'),
  autoPos?: boolean(name='AutoPos', example='false'),
  autoStart?: boolean(name='AutoStart', example='false'),
  description?: string(name='Description'),
  directoryId?: string(name='DirectoryId', example='399*****488-cn-qingdao'),
  gbId?: string(name='GbId', example='3100000****000000002'),
  groupId?: string(name='GroupId', example='348*****174-cn-qingdao'),
  id?: string(name='Id', description='This parameter is required.', example='348*****380-cn-qingdao'),
  ip?: string(name='Ip', example='10.10.10.10'),
  latitude?: string(name='Latitude', example='119.20'),
  longitude?: string(name='Longitude', example='45.00'),
  name?: string(name='Name'),
  ownerId?: long(name='OwnerId'),
  params?: string(name='Params', example='{}'),
  parentId?: string(name='ParentId', example='399*****774-cn-qingdao'),
  password?: string(name='Password', example='admin'),
  port?: long(name='Port', example='8080'),
  posInterval?: long(name='PosInterval', example='300'),
  type?: string(name='Type', example='ipc'),
  url?: string(name='Url', example='rtmp://xxx/xxx'),
  username?: string(name='Username', example='admin'),
  vendor?: string(name='Vendor'),
}

model ModifyDeviceResponseBody = {
  id?: string(name='Id', example='348*****380-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model ModifyDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyDeviceResponseBody(name='body'),
}

/**
 * @param request ModifyDeviceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyDeviceResponse
 */
async function modifyDeviceWithOptions(request: ModifyDeviceRequest, runtime: $RuntimeOptions): ModifyDeviceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.alarmMethod)) {
    query['AlarmMethod'] = request.alarmMethod;
  }
  if (!$isNull(request.autoDirectory)) {
    query['AutoDirectory'] = request.autoDirectory;
  }
  if (!$isNull(request.autoPos)) {
    query['AutoPos'] = request.autoPos;
  }
  if (!$isNull(request.autoStart)) {
    query['AutoStart'] = request.autoStart;
  }
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.directoryId)) {
    query['DirectoryId'] = request.directoryId;
  }
  if (!$isNull(request.gbId)) {
    query['GbId'] = request.gbId;
  }
  if (!$isNull(request.groupId)) {
    query['GroupId'] = request.groupId;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ip)) {
    query['Ip'] = request.ip;
  }
  if (!$isNull(request.latitude)) {
    query['Latitude'] = request.latitude;
  }
  if (!$isNull(request.longitude)) {
    query['Longitude'] = request.longitude;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.params)) {
    query['Params'] = request.params;
  }
  if (!$isNull(request.parentId)) {
    query['ParentId'] = request.parentId;
  }
  if (!$isNull(request.password)) {
    query['Password'] = request.password;
  }
  if (!$isNull(request.port)) {
    query['Port'] = request.port;
  }
  if (!$isNull(request.posInterval)) {
    query['PosInterval'] = request.posInterval;
  }
  if (!$isNull(request.type)) {
    query['Type'] = request.type;
  }
  if (!$isNull(request.url)) {
    query['Url'] = request.url;
  }
  if (!$isNull(request.username)) {
    query['Username'] = request.username;
  }
  if (!$isNull(request.vendor)) {
    query['Vendor'] = request.vendor;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyDevice',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyDeviceRequest
 * @return ModifyDeviceResponse
 */
async function modifyDevice(request: ModifyDeviceRequest): ModifyDeviceResponse {
  var runtime = new $RuntimeOptions{};
  return modifyDeviceWithOptions(request, runtime);
}

model ModifyDeviceAlarmRequest {
  alarmId?: string(name='AlarmId', description='This parameter is required.', example='0dGo7jLwwf1000296232'),
  channelId?: int32(name='ChannelId', description='This parameter is required.', example='10'),
  id?: string(name='Id', description='This parameter is required.', example='348*****380-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  status?: int32(name='Status', description='This parameter is required.', example='1'),
}

model ModifyDeviceAlarmResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model ModifyDeviceAlarmResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyDeviceAlarmResponseBody(name='body'),
}

/**
 * @param request ModifyDeviceAlarmRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyDeviceAlarmResponse
 */
async function modifyDeviceAlarmWithOptions(request: ModifyDeviceAlarmRequest, runtime: $RuntimeOptions): ModifyDeviceAlarmResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.alarmId)) {
    query['AlarmId'] = request.alarmId;
  }
  if (!$isNull(request.channelId)) {
    query['ChannelId'] = request.channelId;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.status)) {
    query['Status'] = request.status;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyDeviceAlarm',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyDeviceAlarmRequest
 * @return ModifyDeviceAlarmResponse
 */
async function modifyDeviceAlarm(request: ModifyDeviceAlarmRequest): ModifyDeviceAlarmResponse {
  var runtime = new $RuntimeOptions{};
  return modifyDeviceAlarmWithOptions(request, runtime);
}

model ModifyDeviceCaptureRequest {
  id?: string(name='Id', description='This parameter is required.', example='348*****380-cn-qingdao'),
  image?: int32(name='Image', example='0'),
  ownerId?: long(name='OwnerId'),
  video?: int32(name='Video', example='1'),
}

model ModifyDeviceCaptureResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model ModifyDeviceCaptureResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyDeviceCaptureResponseBody(name='body'),
}

/**
 * @param request ModifyDeviceCaptureRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyDeviceCaptureResponse
 */
async function modifyDeviceCaptureWithOptions(request: ModifyDeviceCaptureRequest, runtime: $RuntimeOptions): ModifyDeviceCaptureResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.image)) {
    query['Image'] = request.image;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.video)) {
    query['Video'] = request.video;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyDeviceCapture',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyDeviceCaptureRequest
 * @return ModifyDeviceCaptureResponse
 */
async function modifyDeviceCapture(request: ModifyDeviceCaptureRequest): ModifyDeviceCaptureResponse {
  var runtime = new $RuntimeOptions{};
  return modifyDeviceCaptureWithOptions(request, runtime);
}

model ModifyDeviceChannelsRequest {
  channels?: string(name='Channels', description='This parameter is required.'),
  deviceStatus?: string(name='DeviceStatus', example='on'),
  dsn?: string(name='Dsn', example='210235C3GN32090008286cf17e130d'),
  id?: string(name='Id', description='This parameter is required.', example='348*****380-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model ModifyDeviceChannelsResponseBody = {
  requestId?: string(name='RequestId', example='8F4D95B6-EB19-5245-AD77-95EDA83E53B7'),
}

model ModifyDeviceChannelsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyDeviceChannelsResponseBody(name='body'),
}

/**
 * @param request ModifyDeviceChannelsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyDeviceChannelsResponse
 */
async function modifyDeviceChannelsWithOptions(request: ModifyDeviceChannelsRequest, runtime: $RuntimeOptions): ModifyDeviceChannelsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.channels)) {
    query['Channels'] = request.channels;
  }
  if (!$isNull(request.deviceStatus)) {
    query['DeviceStatus'] = request.deviceStatus;
  }
  if (!$isNull(request.dsn)) {
    query['Dsn'] = request.dsn;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyDeviceChannels',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyDeviceChannelsRequest
 * @return ModifyDeviceChannelsResponse
 */
async function modifyDeviceChannels(request: ModifyDeviceChannelsRequest): ModifyDeviceChannelsResponse {
  var runtime = new $RuntimeOptions{};
  return modifyDeviceChannelsWithOptions(request, runtime);
}

model ModifyDirectoryRequest {
  description?: string(name='Description'),
  id?: string(name='Id', description='This parameter is required.', example='399*****488-cn-qingdao'),
  name?: string(name='Name'),
  ownerId?: long(name='OwnerId'),
}

model ModifyDirectoryResponseBody = {
  id?: string(name='Id', example='399*****488-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model ModifyDirectoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyDirectoryResponseBody(name='body'),
}

/**
 * @param request ModifyDirectoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyDirectoryResponse
 */
async function modifyDirectoryWithOptions(request: ModifyDirectoryRequest, runtime: $RuntimeOptions): ModifyDirectoryResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyDirectory',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyDirectoryRequest
 * @return ModifyDirectoryResponse
 */
async function modifyDirectory(request: ModifyDirectoryRequest): ModifyDirectoryResponse {
  var runtime = new $RuntimeOptions{};
  return modifyDirectoryWithOptions(request, runtime);
}

model ModifyGroupRequest {
  callback?: string(name='Callback', example='http://example.com/callback'),
  description?: string(name='Description'),
  enabled?: boolean(name='Enabled', example='true'),
  id?: string(name='Id', description='This parameter is required.', example='32388487739092994-cn-qingdao'),
  inProtocol?: string(name='InProtocol', example='gb28181'),
  lazyPull?: boolean(name='LazyPull', example='false'),
  name?: string(name='Name', example='myGroup'),
  outProtocol?: string(name='OutProtocol', example='flv,rtmp,hls'),
  ownerId?: long(name='OwnerId'),
  playDomain?: string(name='PlayDomain', example='myplay.com'),
  pushDomain?: string(name='PushDomain', example='mypush.com'),
  region?: string(name='Region', example='cn-qingdao'),
}

model ModifyGroupResponseBody = {
  id?: string(name='Id', example='32388487739092994-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model ModifyGroupResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyGroupResponseBody(name='body'),
}

/**
 * @param request ModifyGroupRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyGroupResponse
 */
async function modifyGroupWithOptions(request: ModifyGroupRequest, runtime: $RuntimeOptions): ModifyGroupResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.callback)) {
    query['Callback'] = request.callback;
  }
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.enabled)) {
    query['Enabled'] = request.enabled;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.inProtocol)) {
    query['InProtocol'] = request.inProtocol;
  }
  if (!$isNull(request.lazyPull)) {
    query['LazyPull'] = request.lazyPull;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.outProtocol)) {
    query['OutProtocol'] = request.outProtocol;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.playDomain)) {
    query['PlayDomain'] = request.playDomain;
  }
  if (!$isNull(request.pushDomain)) {
    query['PushDomain'] = request.pushDomain;
  }
  if (!$isNull(request.region)) {
    query['Region'] = request.region;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyGroup',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyGroupRequest
 * @return ModifyGroupResponse
 */
async function modifyGroup(request: ModifyGroupRequest): ModifyGroupResponse {
  var runtime = new $RuntimeOptions{};
  return modifyGroupWithOptions(request, runtime);
}

model ModifyParentPlatformRequest {
  autoStart?: boolean(name='AutoStart', example='false'),
  clientAuth?: boolean(name='ClientAuth', example='true'),
  clientPassword?: string(name='ClientPassword', example='admin123'),
  clientUsername?: string(name='ClientUsername', example='user01'),
  description?: string(name='Description'),
  gbId?: string(name='GbId', example='31000*****2170123451'),
  id?: string(name='Id', description='This parameter is required.', example='359*****374-cn-qingdao'),
  ip?: string(name='Ip', example='10.10.10.10'),
  name?: string(name='Name'),
  ownerId?: long(name='OwnerId'),
  port?: long(name='Port', example='5060'),
}

model ModifyParentPlatformResponseBody = {
  id?: string(name='Id', example='359*****374-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model ModifyParentPlatformResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyParentPlatformResponseBody(name='body'),
}

/**
 * @param request ModifyParentPlatformRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyParentPlatformResponse
 */
async function modifyParentPlatformWithOptions(request: ModifyParentPlatformRequest, runtime: $RuntimeOptions): ModifyParentPlatformResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.autoStart)) {
    query['AutoStart'] = request.autoStart;
  }
  if (!$isNull(request.clientAuth)) {
    query['ClientAuth'] = request.clientAuth;
  }
  if (!$isNull(request.clientPassword)) {
    query['ClientPassword'] = request.clientPassword;
  }
  if (!$isNull(request.clientUsername)) {
    query['ClientUsername'] = request.clientUsername;
  }
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.gbId)) {
    query['GbId'] = request.gbId;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ip)) {
    query['Ip'] = request.ip;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.port)) {
    query['Port'] = request.port;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyParentPlatform',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyParentPlatformRequest
 * @return ModifyParentPlatformResponse
 */
async function modifyParentPlatform(request: ModifyParentPlatformRequest): ModifyParentPlatformResponse {
  var runtime = new $RuntimeOptions{};
  return modifyParentPlatformWithOptions(request, runtime);
}

model ModifyRenderingInstanceRequest {
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
  renderingSpec?: string(name='RenderingSpec', example='crs.cp.l1'),
  storageSize?: string(name='StorageSize', example='20'),
}

model ModifyRenderingInstanceResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='6DFE7B89-8532-566F-B5CE-924B10FCE7AC'),
}

model ModifyRenderingInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyRenderingInstanceResponseBody(name='body'),
}

/**
 * @summary 变配云渲染资源实例
 *
 * @param request ModifyRenderingInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyRenderingInstanceResponse
 */
async function modifyRenderingInstanceWithOptions(request: ModifyRenderingInstanceRequest, runtime: $RuntimeOptions): ModifyRenderingInstanceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  if (!$isNull(request.renderingSpec)) {
    query['RenderingSpec'] = request.renderingSpec;
  }
  if (!$isNull(request.storageSize)) {
    query['StorageSize'] = request.storageSize;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyRenderingInstance',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 变配云渲染资源实例
 *
 * @param request ModifyRenderingInstanceRequest
 * @return ModifyRenderingInstanceResponse
 */
async function modifyRenderingInstance(request: ModifyRenderingInstanceRequest): ModifyRenderingInstanceResponse {
  var runtime = new $RuntimeOptions{};
  return modifyRenderingInstanceWithOptions(request, runtime);
}

model ModifyRenderingInstanceBandwidthRequest {
  maxEgressBandwidth?: int32(name='MaxEgressBandwidth', example='100'),
  maxIngressBandwidth?: int32(name='MaxIngressBandwidth', example='100'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model ModifyRenderingInstanceBandwidthResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model ModifyRenderingInstanceBandwidthResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyRenderingInstanceBandwidthResponseBody(name='body'),
}

/**
 * @summary 修改云渲染实例限速带宽
 *
 * @param request ModifyRenderingInstanceBandwidthRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyRenderingInstanceBandwidthResponse
 */
async function modifyRenderingInstanceBandwidthWithOptions(request: ModifyRenderingInstanceBandwidthRequest, runtime: $RuntimeOptions): ModifyRenderingInstanceBandwidthResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.maxEgressBandwidth)) {
    query['MaxEgressBandwidth'] = request.maxEgressBandwidth;
  }
  if (!$isNull(request.maxIngressBandwidth)) {
    query['MaxIngressBandwidth'] = request.maxIngressBandwidth;
  }
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyRenderingInstanceBandwidth',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 修改云渲染实例限速带宽
 *
 * @param request ModifyRenderingInstanceBandwidthRequest
 * @return ModifyRenderingInstanceBandwidthResponse
 */
async function modifyRenderingInstanceBandwidth(request: ModifyRenderingInstanceBandwidthRequest): ModifyRenderingInstanceBandwidthResponse {
  var runtime = new $RuntimeOptions{};
  return modifyRenderingInstanceBandwidthWithOptions(request, runtime);
}

model ModifyTemplateRequest {
  callback?: string(name='Callback', example='http://example.com/callback'),
  description?: string(name='Description'),
  fileFormat?: string(name='FileFormat', example='hls'),
  flv?: string(name='Flv', example='osspath/record/{StreamName}/{EscapedStartTime}_{EscapedEndTime}'),
  hlsM3u8?: string(name='HlsM3u8', example='osspath/record/{StreamName}/{EscapedStartTime}_{EscapedEndTime}'),
  hlsTs?: string(name='HlsTs', example='osspath/record/{StreamName}/{UnixTimestamp}_{Sequence}'),
  id?: string(name='Id', description='This parameter is required.', example='323*****998-cn-qingdao'),
  interval?: long(name='Interval', example='3600'),
  jpgOnDemand?: string(name='JpgOnDemand', example='osspath/snapshot/{AppName}/{StreamName}/{UnixTimestamp}_ondemand.jpg'),
  jpgOverwrite?: string(name='JpgOverwrite', example='osspath/snapshot/{AppName}/{StreamName}.jpg'),
  jpgSequence?: string(name='JpgSequence', example='osspath/snapshot/{AppName}/{StreamName}/{UnixTimestamp}.jpg'),
  mp4?: string(name='Mp4', example='osspath/record/{StreamName}/{EscapedStartTime}_{EscapedEndTime}'),
  name?: string(name='Name'),
  ossBucket?: string(name='OssBucket', example='bucketname'),
  ossEndpoint?: string(name='OssEndpoint', example='oss-cn-qingdao.aliyuncs.com'),
  ossFilePrefix?: string(name='OssFilePrefix', example='oss-prefix'),
  ownerId?: long(name='OwnerId'),
  region?: string(name='Region', example='cn-qingdao'),
  retention?: long(name='Retention', example='3'),
  transConfigsJSON?: string(name='TransConfigsJSON', example='[{"Fps":25,"Gop":50,"Height":720,"VideoCodec":"h264","Width":1280,"Name":"sd","VideoBitrate":800}]'),
  trigger?: string(name='Trigger', example='auto'),
}

model ModifyTemplateResponseBody = {
  id?: string(name='Id', example='323*****998-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model ModifyTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ModifyTemplateResponseBody(name='body'),
}

/**
 * @param request ModifyTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ModifyTemplateResponse
 */
async function modifyTemplateWithOptions(request: ModifyTemplateRequest, runtime: $RuntimeOptions): ModifyTemplateResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.callback)) {
    query['Callback'] = request.callback;
  }
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.fileFormat)) {
    query['FileFormat'] = request.fileFormat;
  }
  if (!$isNull(request.flv)) {
    query['Flv'] = request.flv;
  }
  if (!$isNull(request.hlsM3u8)) {
    query['HlsM3u8'] = request.hlsM3u8;
  }
  if (!$isNull(request.hlsTs)) {
    query['HlsTs'] = request.hlsTs;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.interval)) {
    query['Interval'] = request.interval;
  }
  if (!$isNull(request.jpgOnDemand)) {
    query['JpgOnDemand'] = request.jpgOnDemand;
  }
  if (!$isNull(request.jpgOverwrite)) {
    query['JpgOverwrite'] = request.jpgOverwrite;
  }
  if (!$isNull(request.jpgSequence)) {
    query['JpgSequence'] = request.jpgSequence;
  }
  if (!$isNull(request.mp4)) {
    query['Mp4'] = request.mp4;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ossBucket)) {
    query['OssBucket'] = request.ossBucket;
  }
  if (!$isNull(request.ossEndpoint)) {
    query['OssEndpoint'] = request.ossEndpoint;
  }
  if (!$isNull(request.ossFilePrefix)) {
    query['OssFilePrefix'] = request.ossFilePrefix;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.region)) {
    query['Region'] = request.region;
  }
  if (!$isNull(request.retention)) {
    query['Retention'] = request.retention;
  }
  if (!$isNull(request.transConfigsJSON)) {
    query['TransConfigsJSON'] = request.transConfigsJSON;
  }
  if (!$isNull(request.trigger)) {
    query['Trigger'] = request.trigger;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ModifyTemplate',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ModifyTemplateRequest
 * @return ModifyTemplateResponse
 */
async function modifyTemplate(request: ModifyTemplateRequest): ModifyTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return modifyTemplateWithOptions(request, runtime);
}

model OpenVsServiceResponseBody = {
  orderId?: string(name='OrderId', example='150275784'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model OpenVsServiceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: OpenVsServiceResponseBody(name='body'),
}

/**
 * @param request OpenVsServiceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return OpenVsServiceResponse
 */
async function openVsServiceWithOptions(runtime: $RuntimeOptions): OpenVsServiceResponse {
  var req = new OpenApiUtil.OpenApiRequest{};
  var params = new OpenApiUtil.Params{
    action = 'OpenVsService',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @return OpenVsServiceResponse
 */
async function openVsService(): OpenVsServiceResponse {
  var runtime = new $RuntimeOptions{};
  return openVsServiceWithOptions(runtime);
}

model PushFileRequest {
  fileId?: string(name='FileId', description='This parameter is required.', example='f-1671accd4dafdag3er256cvgewt13f7141db2f7'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model PushFileResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model PushFileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: PushFileResponseBody(name='body'),
}

/**
 * @summary 预推文件到云渲染实例。
 *
 * @param request PushFileRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return PushFileResponse
 */
async function pushFileWithOptions(request: PushFileRequest, runtime: $RuntimeOptions): PushFileResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.fileId)) {
    query['FileId'] = request.fileId;
  }
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'PushFile',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 预推文件到云渲染实例。
 *
 * @param request PushFileRequest
 * @return PushFileResponse
 */
async function pushFile(request: PushFileRequest): PushFileResponse {
  var runtime = new $RuntimeOptions{};
  return pushFileWithOptions(request, runtime);
}

model RebootRenderingInstanceRequest {
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model RebootRenderingInstanceResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model RebootRenderingInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RebootRenderingInstanceResponseBody(name='body'),
}

/**
 * @summary 重启云渲染实例
 *
 * @param request RebootRenderingInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RebootRenderingInstanceResponse
 */
async function rebootRenderingInstanceWithOptions(request: RebootRenderingInstanceRequest, runtime: $RuntimeOptions): RebootRenderingInstanceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'RebootRenderingInstance',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 重启云渲染实例
 *
 * @param request RebootRenderingInstanceRequest
 * @return RebootRenderingInstanceResponse
 */
async function rebootRenderingInstance(request: RebootRenderingInstanceRequest): RebootRenderingInstanceResponse {
  var runtime = new $RuntimeOptions{};
  return rebootRenderingInstanceWithOptions(request, runtime);
}

model RecoverRenderingDataPackageRequest {
  dataPackageId?: string(name='DataPackageId', description='This parameter is required.', example='dp-449ea3d16c0841b8bf33ec5bbc86a152'),
  loadMode?: string(name='LoadMode'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model RecoverRenderingDataPackageResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model RecoverRenderingDataPackageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RecoverRenderingDataPackageResponseBody(name='body'),
}

/**
 * @summary 恢复数据到云渲染实例
 *
 * @param request RecoverRenderingDataPackageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RecoverRenderingDataPackageResponse
 */
async function recoverRenderingDataPackageWithOptions(request: RecoverRenderingDataPackageRequest, runtime: $RuntimeOptions): RecoverRenderingDataPackageResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.dataPackageId)) {
    query['DataPackageId'] = request.dataPackageId;
  }
  if (!$isNull(request.loadMode)) {
    query['LoadMode'] = request.loadMode;
  }
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'RecoverRenderingDataPackage',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 恢复数据到云渲染实例
 *
 * @param request RecoverRenderingDataPackageRequest
 * @return RecoverRenderingDataPackageResponse
 */
async function recoverRenderingDataPackage(request: RecoverRenderingDataPackageRequest): RecoverRenderingDataPackageResponse {
  var runtime = new $RuntimeOptions{};
  return recoverRenderingDataPackageWithOptions(request, runtime);
}

model RefreshRenderingInstanceStreamingRequest {
  clientInfo?: {
    clientIp?: string(name='ClientIp', example='172.21.128.110'),
    newClient?: boolean(name='NewClient', example='true'),
  }(name='ClientInfo'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model RefreshRenderingInstanceStreamingShrinkRequest {
  clientInfoShrink?: string(name='ClientInfo'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model RefreshRenderingInstanceStreamingResponseBody = {
  flowId?: string(name='FlowId', example='792fy125-594c-4dde-ab35-9ff8hrf0a86f'),
  gateway?: string(name='Gateway', example='10.178.208.22'),
  hostname?: string(name='Hostname', example='cn-xxx.ecr.aliyuncs.com'),
  port?: string(name='Port', example='8080'),
  renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
  requestId?: string(name='RequestId', description='Id of the request', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model RefreshRenderingInstanceStreamingResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RefreshRenderingInstanceStreamingResponseBody(name='body'),
}

/**
 * @summary 更新实例流连接信息
 *
 * @param tmpReq RefreshRenderingInstanceStreamingRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RefreshRenderingInstanceStreamingResponse
 */
async function refreshRenderingInstanceStreamingWithOptions(tmpReq: RefreshRenderingInstanceStreamingRequest, runtime: $RuntimeOptions): RefreshRenderingInstanceStreamingResponse {
  tmpReq.validate();
  var request = new RefreshRenderingInstanceStreamingShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.clientInfo)) {
    request.clientInfoShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.clientInfo, 'ClientInfo', 'json');
  }
  var query = {};
  if (!$isNull(request.clientInfoShrink)) {
    query['ClientInfo'] = request.clientInfoShrink;
  }
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'RefreshRenderingInstanceStreaming',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 更新实例流连接信息
 *
 * @param request RefreshRenderingInstanceStreamingRequest
 * @return RefreshRenderingInstanceStreamingResponse
 */
async function refreshRenderingInstanceStreaming(request: RefreshRenderingInstanceStreamingRequest): RefreshRenderingInstanceStreamingResponse {
  var runtime = new $RuntimeOptions{};
  return refreshRenderingInstanceStreamingWithOptions(request, runtime);
}

model ReleaseRenderingDataPackageRequest {
  dataPackageId?: string(name='DataPackageId', description='This parameter is required.', example='dp-9f8c57355d224ad7beaf95e145f22111'),
}

model ReleaseRenderingDataPackageResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='5BEF36E7-3838-5B92-BA32-87DBF1425ABC'),
}

model ReleaseRenderingDataPackageResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ReleaseRenderingDataPackageResponseBody(name='body'),
}

/**
 * @summary 释放云渲染数据包
 *
 * @param request ReleaseRenderingDataPackageRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ReleaseRenderingDataPackageResponse
 */
async function releaseRenderingDataPackageWithOptions(request: ReleaseRenderingDataPackageRequest, runtime: $RuntimeOptions): ReleaseRenderingDataPackageResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.dataPackageId)) {
    query['DataPackageId'] = request.dataPackageId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ReleaseRenderingDataPackage',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 释放云渲染数据包
 *
 * @param request ReleaseRenderingDataPackageRequest
 * @return ReleaseRenderingDataPackageResponse
 */
async function releaseRenderingDataPackage(request: ReleaseRenderingDataPackageRequest): ReleaseRenderingDataPackageResponse {
  var runtime = new $RuntimeOptions{};
  return releaseRenderingDataPackageWithOptions(request, runtime);
}

model ReleaseRenderingInstanceRequest {
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model ReleaseRenderingInstanceResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model ReleaseRenderingInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ReleaseRenderingInstanceResponseBody(name='body'),
}

/**
 * @summary 释放云渲染实例
 *
 * @param request ReleaseRenderingInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ReleaseRenderingInstanceResponse
 */
async function releaseRenderingInstanceWithOptions(request: ReleaseRenderingInstanceRequest, runtime: $RuntimeOptions): ReleaseRenderingInstanceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ReleaseRenderingInstance',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 释放云渲染实例
 *
 * @param request ReleaseRenderingInstanceRequest
 * @return ReleaseRenderingInstanceResponse
 */
async function releaseRenderingInstance(request: ReleaseRenderingInstanceRequest): ReleaseRenderingInstanceResponse {
  var runtime = new $RuntimeOptions{};
  return releaseRenderingInstanceWithOptions(request, runtime);
}

model RenewRenderingInstanceRequest {
  autoRenew?: boolean(name='AutoRenew', example='true'),
  period?: string(name='Period', example='1'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model RenewRenderingInstanceResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model RenewRenderingInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: RenewRenderingInstanceResponseBody(name='body'),
}

/**
 * @summary 续费云渲染资源实例
 *
 * @param request RenewRenderingInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return RenewRenderingInstanceResponse
 */
async function renewRenderingInstanceWithOptions(request: RenewRenderingInstanceRequest, runtime: $RuntimeOptions): RenewRenderingInstanceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.autoRenew)) {
    query['AutoRenew'] = request.autoRenew;
  }
  if (!$isNull(request.period)) {
    query['Period'] = request.period;
  }
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'RenewRenderingInstance',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 续费云渲染资源实例
 *
 * @param request RenewRenderingInstanceRequest
 * @return RenewRenderingInstanceResponse
 */
async function renewRenderingInstance(request: RenewRenderingInstanceRequest): RenewRenderingInstanceResponse {
  var runtime = new $RuntimeOptions{};
  return renewRenderingInstanceWithOptions(request, runtime);
}

model ResetRenderingInstanceRequest {
  actionName?: string(name='ActionName', example='Reset'),
  dataPackageId?: string(name='DataPackageId'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model ResetRenderingInstanceResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model ResetRenderingInstanceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ResetRenderingInstanceResponseBody(name='body'),
}

/**
 * @summary 重置云渲染实例
 *
 * @param request ResetRenderingInstanceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResetRenderingInstanceResponse
 */
async function resetRenderingInstanceWithOptions(request: ResetRenderingInstanceRequest, runtime: $RuntimeOptions): ResetRenderingInstanceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.actionName)) {
    query['ActionName'] = request.actionName;
  }
  if (!$isNull(request.dataPackageId)) {
    query['DataPackageId'] = request.dataPackageId;
  }
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ResetRenderingInstance',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 重置云渲染实例
 *
 * @param request ResetRenderingInstanceRequest
 * @return ResetRenderingInstanceResponse
 */
async function resetRenderingInstance(request: ResetRenderingInstanceRequest): ResetRenderingInstanceResponse {
  var runtime = new $RuntimeOptions{};
  return resetRenderingInstanceWithOptions(request, runtime);
}

model ResumeVsStreamRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='xxxxApp'),
  controlStreamAction?: string(name='ControlStreamAction'),
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.aliyundoc.com'),
  liveStreamType?: string(name='LiveStreamType', description='This parameter is required.', example='publisher'),
  ownerId?: long(name='OwnerId'),
  streamName?: string(name='StreamName', description='This parameter is required.', example='xxxxStream'),
}

model ResumeVsStreamResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model ResumeVsStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: ResumeVsStreamResponseBody(name='body'),
}

/**
 * @param request ResumeVsStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return ResumeVsStreamResponse
 */
async function resumeVsStreamWithOptions(request: ResumeVsStreamRequest, runtime: $RuntimeOptions): ResumeVsStreamResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!$isNull(request.controlStreamAction)) {
    query['ControlStreamAction'] = request.controlStreamAction;
  }
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.liveStreamType)) {
    query['LiveStreamType'] = request.liveStreamType;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'ResumeVsStream',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request ResumeVsStreamRequest
 * @return ResumeVsStreamResponse
 */
async function resumeVsStream(request: ResumeVsStreamRequest): ResumeVsStreamResponse {
  var runtime = new $RuntimeOptions{};
  return resumeVsStreamWithOptions(request, runtime);
}

model SendRenderingInstanceCommandsRequest {
  commands?: string(name='Commands', description='This parameter is required.', example='date;ls -l /tmp'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model SendRenderingInstanceCommandsResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  result?: string(name='Result', example='Thu Jun 27 16:06:26 CST 2024'),
}

model SendRenderingInstanceCommandsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SendRenderingInstanceCommandsResponseBody(name='body'),
}

/**
 * @summary 下发shell命令，同步响应。不适用于耗时命令。
 *
 * @param request SendRenderingInstanceCommandsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SendRenderingInstanceCommandsResponse
 */
async function sendRenderingInstanceCommandsWithOptions(request: SendRenderingInstanceCommandsRequest, runtime: $RuntimeOptions): SendRenderingInstanceCommandsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.commands)) {
    body['Commands'] = request.commands;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'SendRenderingInstanceCommands',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 下发shell命令，同步响应。不适用于耗时命令。
 *
 * @param request SendRenderingInstanceCommandsRequest
 * @return SendRenderingInstanceCommandsResponse
 */
async function sendRenderingInstanceCommands(request: SendRenderingInstanceCommandsRequest): SendRenderingInstanceCommandsResponse {
  var runtime = new $RuntimeOptions{};
  return sendRenderingInstanceCommandsWithOptions(request, runtime);
}

model SetPresetRequest {
  id?: string(name='Id', description='This parameter is required.', example='348*****380-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  presetId?: string(name='PresetId', description='This parameter is required.', example='2'),
}

model SetPresetResponseBody = {
  id?: string(name='Id', example='348*****380-cn-qingdao'),
  requestId?: string(name='RequestId', example='30295DF1-1DC7-48BA-BE5A-D58E61EB2375'),
}

model SetPresetResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetPresetResponseBody(name='body'),
}

/**
 * @param request SetPresetRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetPresetResponse
 */
async function setPresetWithOptions(request: SetPresetRequest, runtime: $RuntimeOptions): SetPresetResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.presetId)) {
    query['PresetId'] = request.presetId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'SetPreset',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request SetPresetRequest
 * @return SetPresetResponse
 */
async function setPreset(request: SetPresetRequest): SetPresetResponse {
  var runtime = new $RuntimeOptions{};
  return setPresetWithOptions(request, runtime);
}

model SetVsDomainCertificateRequest {
  certName?: string(name='CertName', example='Cert-77****7'),
  certType?: string(name='CertType', example='free'),
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.aliyundoc.com'),
  forceSet?: string(name='ForceSet', example='1'),
  ownerId?: long(name='OwnerId'),
  region?: string(name='Region', example='cn-qingdao'),
  SSLPri?: string(name='SSLPri', example='xxxxxxx'),
  SSLProtocol?: string(name='SSLProtocol', description='This parameter is required.', example='on'),
  SSLPub?: string(name='SSLPub', example='328uiuii28****82dsada81'),
}

model SetVsDomainCertificateResponseBody = {
  requestId?: string(name='RequestId', example='119F7639-4646-51A4-B6C1-300D391C0104'),
}

model SetVsDomainCertificateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetVsDomainCertificateResponseBody(name='body'),
}

/**
 * @param request SetVsDomainCertificateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetVsDomainCertificateResponse
 */
async function setVsDomainCertificateWithOptions(request: SetVsDomainCertificateRequest, runtime: $RuntimeOptions): SetVsDomainCertificateResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.certName)) {
    query['CertName'] = request.certName;
  }
  if (!$isNull(request.certType)) {
    query['CertType'] = request.certType;
  }
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.forceSet)) {
    query['ForceSet'] = request.forceSet;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.region)) {
    query['Region'] = request.region;
  }
  if (!$isNull(request.SSLPri)) {
    query['SSLPri'] = request.SSLPri;
  }
  if (!$isNull(request.SSLProtocol)) {
    query['SSLProtocol'] = request.SSLProtocol;
  }
  if (!$isNull(request.SSLPub)) {
    query['SSLPub'] = request.SSLPub;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'SetVsDomainCertificate',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request SetVsDomainCertificateRequest
 * @return SetVsDomainCertificateResponse
 */
async function setVsDomainCertificate(request: SetVsDomainCertificateRequest): SetVsDomainCertificateResponse {
  var runtime = new $RuntimeOptions{};
  return setVsDomainCertificateWithOptions(request, runtime);
}

model SetVsStreamsNotifyUrlConfigRequest {
  authKey?: string(name='AuthKey', example='ocs*****ace'),
  authType?: string(name='AuthType', example='type_a'),
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.com'),
  notifyUrl?: string(name='NotifyUrl', description='This parameter is required.', example='http://xxx.com/xx'),
  ownerId?: long(name='OwnerId'),
}

model SetVsStreamsNotifyUrlConfigResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model SetVsStreamsNotifyUrlConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SetVsStreamsNotifyUrlConfigResponseBody(name='body'),
}

/**
 * @param request SetVsStreamsNotifyUrlConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SetVsStreamsNotifyUrlConfigResponse
 */
async function setVsStreamsNotifyUrlConfigWithOptions(request: SetVsStreamsNotifyUrlConfigRequest, runtime: $RuntimeOptions): SetVsStreamsNotifyUrlConfigResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.authKey)) {
    query['AuthKey'] = request.authKey;
  }
  if (!$isNull(request.authType)) {
    query['AuthType'] = request.authType;
  }
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.notifyUrl)) {
    query['NotifyUrl'] = request.notifyUrl;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'SetVsStreamsNotifyUrlConfig',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request SetVsStreamsNotifyUrlConfigRequest
 * @return SetVsStreamsNotifyUrlConfigResponse
 */
async function setVsStreamsNotifyUrlConfig(request: SetVsStreamsNotifyUrlConfigRequest): SetVsStreamsNotifyUrlConfigResponse {
  var runtime = new $RuntimeOptions{};
  return setVsStreamsNotifyUrlConfigWithOptions(request, runtime);
}

model StartDeviceRequest {
  id?: string(name='Id', description='This parameter is required.', example='323884****9092996'),
  ownerId?: long(name='OwnerId'),
}

model StartDeviceResponseBody = {
  id?: string(name='Id', example='323884****9092996'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model StartDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartDeviceResponseBody(name='body'),
}

/**
 * @param request StartDeviceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartDeviceResponse
 */
async function startDeviceWithOptions(request: StartDeviceRequest, runtime: $RuntimeOptions): StartDeviceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StartDevice',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request StartDeviceRequest
 * @return StartDeviceResponse
 */
async function startDevice(request: StartDeviceRequest): StartDeviceResponse {
  var runtime = new $RuntimeOptions{};
  return startDeviceWithOptions(request, runtime);
}

model StartParentPlatformRequest {
  id?: string(name='Id', description='This parameter is required.', example='359*****374-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model StartParentPlatformResponseBody = {
  id?: string(name='Id', example='359*****374-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model StartParentPlatformResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartParentPlatformResponseBody(name='body'),
}

/**
 * @param request StartParentPlatformRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartParentPlatformResponse
 */
async function startParentPlatformWithOptions(request: StartParentPlatformRequest, runtime: $RuntimeOptions): StartParentPlatformResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StartParentPlatform',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request StartParentPlatformRequest
 * @return StartParentPlatformResponse
 */
async function startParentPlatform(request: StartParentPlatformRequest): StartParentPlatformResponse {
  var runtime = new $RuntimeOptions{};
  return startParentPlatformWithOptions(request, runtime);
}

model StartPublishStreamRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
  publishUrl?: string(name='PublishUrl', description='This parameter is required.'),
}

model StartPublishStreamResponseBody = {
  code?: long(name='Code'),
  message?: long(name='Message'),
  requestId?: string(name='RequestId'),
}

model StartPublishStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartPublishStreamResponseBody(name='body'),
}

/**
 * @param request StartPublishStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartPublishStreamResponse
 */
async function startPublishStreamWithOptions(request: StartPublishStreamRequest, runtime: $RuntimeOptions): StartPublishStreamResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.publishUrl)) {
    query['PublishUrl'] = request.publishUrl;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StartPublishStream',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request StartPublishStreamRequest
 * @return StartPublishStreamResponse
 */
async function startPublishStream(request: StartPublishStreamRequest): StartPublishStreamResponse {
  var runtime = new $RuntimeOptions{};
  return startPublishStreamWithOptions(request, runtime);
}

model StartRecordStreamRequest {
  app?: string(name='App', example='live'),
  id?: string(name='Id', example='323*****997-cn-qingdao'),
  name?: string(name='Name', example='310000*****000002'),
  ownerId?: long(name='OwnerId'),
  playDomain?: string(name='PlayDomain', example='example.com'),
}

model StartRecordStreamResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model StartRecordStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartRecordStreamResponseBody(name='body'),
}

/**
 * @param request StartRecordStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartRecordStreamResponse
 */
async function startRecordStreamWithOptions(request: StartRecordStreamRequest, runtime: $RuntimeOptions): StartRecordStreamResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.app)) {
    query['App'] = request.app;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.playDomain)) {
    query['PlayDomain'] = request.playDomain;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StartRecordStream',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request StartRecordStreamRequest
 * @return StartRecordStreamResponse
 */
async function startRecordStream(request: StartRecordStreamRequest): StartRecordStreamResponse {
  var runtime = new $RuntimeOptions{};
  return startRecordStreamWithOptions(request, runtime);
}

model StartStreamRequest {
  endTime?: long(name='EndTime', example='1599336385'),
  id?: string(name='Id', description='This parameter is required.', example='323*****997-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  startTime?: long(name='StartTime', example='1589336385'),
}

model StartStreamResponseBody = {
  id?: string(name='Id', example='323*****997-cn-qingdao'),
  name?: string(name='Name', example='31000000000000000002'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model StartStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartStreamResponseBody(name='body'),
}

/**
 * @param request StartStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartStreamResponse
 */
async function startStreamWithOptions(request: StartStreamRequest, runtime: $RuntimeOptions): StartStreamResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StartStream',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request StartStreamRequest
 * @return StartStreamResponse
 */
async function startStream(request: StartStreamRequest): StartStreamResponse {
  var runtime = new $RuntimeOptions{};
  return startStreamWithOptions(request, runtime);
}

model StartTransferStreamRequest {
  id?: string(name='Id', description='This parameter is required.', example='323*****998-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  transcode?: string(name='Transcode', example='sd'),
  url?: string(name='Url', description='This parameter is required.', example='example.com'),
}

model StartTransferStreamResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model StartTransferStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StartTransferStreamResponseBody(name='body'),
}

/**
 * @param request StartTransferStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StartTransferStreamResponse
 */
async function startTransferStreamWithOptions(request: StartTransferStreamRequest, runtime: $RuntimeOptions): StartTransferStreamResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.transcode)) {
    query['Transcode'] = request.transcode;
  }
  if (!$isNull(request.url)) {
    query['Url'] = request.url;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StartTransferStream',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request StartTransferStreamRequest
 * @return StartTransferStreamResponse
 */
async function startTransferStream(request: StartTransferStreamRequest): StartTransferStreamResponse {
  var runtime = new $RuntimeOptions{};
  return startTransferStreamWithOptions(request, runtime);
}

model StopAdjustRequest {
  focus?: boolean(name='Focus', example='true'),
  id?: string(name='Id', description='This parameter is required.', example='348*****380-cn-qingdao'),
  iris?: boolean(name='Iris', example='true'),
  ownerId?: long(name='OwnerId'),
}

model StopAdjustResponseBody = {
  id?: string(name='Id', example='348*****380-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model StopAdjustResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopAdjustResponseBody(name='body'),
}

/**
 * @param request StopAdjustRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopAdjustResponse
 */
async function stopAdjustWithOptions(request: StopAdjustRequest, runtime: $RuntimeOptions): StopAdjustResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.focus)) {
    query['Focus'] = request.focus;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.iris)) {
    query['Iris'] = request.iris;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StopAdjust',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request StopAdjustRequest
 * @return StopAdjustResponse
 */
async function stopAdjust(request: StopAdjustRequest): StopAdjustResponse {
  var runtime = new $RuntimeOptions{};
  return stopAdjustWithOptions(request, runtime);
}

model StopDeviceRequest {
  id?: string(name='Id', description='This parameter is required.', example='348*****380-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime', example='2021-12-10T10:00:00Z'),
}

model StopDeviceResponseBody = {
  id?: string(name='Id', example='348*****380-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model StopDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopDeviceResponseBody(name='body'),
}

/**
 * @param request StopDeviceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopDeviceResponse
 */
async function stopDeviceWithOptions(request: StopDeviceRequest, runtime: $RuntimeOptions): StopDeviceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StopDevice',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request StopDeviceRequest
 * @return StopDeviceResponse
 */
async function stopDevice(request: StopDeviceRequest): StopDeviceResponse {
  var runtime = new $RuntimeOptions{};
  return stopDeviceWithOptions(request, runtime);
}

model StopMoveRequest {
  id?: string(name='Id', description='This parameter is required.', example='348*****380-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  pan?: boolean(name='Pan', example='true'),
  tilt?: boolean(name='Tilt', example='true'),
  zoom?: boolean(name='Zoom', example='true'),
}

model StopMoveResponseBody = {
  id?: string(name='Id', example='348*****380-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model StopMoveResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopMoveResponseBody(name='body'),
}

/**
 * @param request StopMoveRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopMoveResponse
 */
async function stopMoveWithOptions(request: StopMoveRequest, runtime: $RuntimeOptions): StopMoveResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.pan)) {
    query['Pan'] = request.pan;
  }
  if (!$isNull(request.tilt)) {
    query['Tilt'] = request.tilt;
  }
  if (!$isNull(request.zoom)) {
    query['Zoom'] = request.zoom;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StopMove',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request StopMoveRequest
 * @return StopMoveResponse
 */
async function stopMove(request: StopMoveRequest): StopMoveResponse {
  var runtime = new $RuntimeOptions{};
  return stopMoveWithOptions(request, runtime);
}

model StopPublishStreamRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.'),
  ownerId?: long(name='OwnerId'),
}

model StopPublishStreamResponseBody = {
  code?: long(name='Code'),
  message?: long(name='Message'),
  requestId?: string(name='RequestId'),
}

model StopPublishStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopPublishStreamResponseBody(name='body'),
}

/**
 * @param request StopPublishStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopPublishStreamResponse
 */
async function stopPublishStreamWithOptions(request: StopPublishStreamRequest, runtime: $RuntimeOptions): StopPublishStreamResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StopPublishStream',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request StopPublishStreamRequest
 * @return StopPublishStreamResponse
 */
async function stopPublishStream(request: StopPublishStreamRequest): StopPublishStreamResponse {
  var runtime = new $RuntimeOptions{};
  return stopPublishStreamWithOptions(request, runtime);
}

model StopRecordStreamRequest {
  app?: string(name='App', example='live'),
  id?: string(name='Id', example='323*****997-cn-qingdao'),
  name?: string(name='Name', example='test'),
  ownerId?: long(name='OwnerId'),
  playDomain?: string(name='PlayDomain', example='example.com'),
}

model StopRecordStreamResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model StopRecordStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopRecordStreamResponseBody(name='body'),
}

/**
 * @param request StopRecordStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopRecordStreamResponse
 */
async function stopRecordStreamWithOptions(request: StopRecordStreamRequest, runtime: $RuntimeOptions): StopRecordStreamResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.app)) {
    query['App'] = request.app;
  }
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.playDomain)) {
    query['PlayDomain'] = request.playDomain;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StopRecordStream',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request StopRecordStreamRequest
 * @return StopRecordStreamResponse
 */
async function stopRecordStream(request: StopRecordStreamRequest): StopRecordStreamResponse {
  var runtime = new $RuntimeOptions{};
  return stopRecordStreamWithOptions(request, runtime);
}

model StopStreamRequest {
  id?: string(name='Id', description='This parameter is required.', example='32388487****92997-cn-qingdao'),
  name?: string(name='Name', example='31000000*****0000002'),
  ownerId?: long(name='OwnerId'),
  startTime?: string(name='StartTime', example='2021-12-12T10:00:00Z'),
}

model StopStreamResponseBody = {
  id?: string(name='Id', example='32388487****92997-cn-qingdao'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model StopStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopStreamResponseBody(name='body'),
}

/**
 * @param request StopStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopStreamResponse
 */
async function stopStreamWithOptions(request: StopStreamRequest, runtime: $RuntimeOptions): StopStreamResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.name)) {
    query['Name'] = request.name;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StopStream',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request StopStreamRequest
 * @return StopStreamResponse
 */
async function stopStream(request: StopStreamRequest): StopStreamResponse {
  var runtime = new $RuntimeOptions{};
  return stopStreamWithOptions(request, runtime);
}

model StopTransferStreamRequest {
  id?: string(name='Id', description='This parameter is required.', example='323434****83423432'),
  ownerId?: long(name='OwnerId'),
  transcode?: string(name='Transcode', example='sd'),
}

model StopTransferStreamResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model StopTransferStreamResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: StopTransferStreamResponseBody(name='body'),
}

/**
 * @param request StopTransferStreamRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return StopTransferStreamResponse
 */
async function stopTransferStreamWithOptions(request: StopTransferStreamRequest, runtime: $RuntimeOptions): StopTransferStreamResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.transcode)) {
    query['Transcode'] = request.transcode;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'StopTransferStream',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request StopTransferStreamRequest
 * @return StopTransferStreamResponse
 */
async function stopTransferStream(request: StopTransferStreamRequest): StopTransferStreamResponse {
  var runtime = new $RuntimeOptions{};
  return stopTransferStreamWithOptions(request, runtime);
}

model SyncCatalogsRequest {
  id?: string(name='Id', description='This parameter is required.', example='3238****739092996'),
  ownerId?: long(name='OwnerId'),
}

model SyncCatalogsResponseBody = {
  id?: string(name='Id', example='3238****739092996'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model SyncCatalogsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: SyncCatalogsResponseBody(name='body'),
}

/**
 * @param request SyncCatalogsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return SyncCatalogsResponse
 */
async function syncCatalogsWithOptions(request: SyncCatalogsRequest, runtime: $RuntimeOptions): SyncCatalogsResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'SyncCatalogs',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request SyncCatalogsRequest
 * @return SyncCatalogsResponse
 */
async function syncCatalogs(request: SyncCatalogsRequest): SyncCatalogsResponse {
  var runtime = new $RuntimeOptions{};
  return syncCatalogsWithOptions(request, runtime);
}

model UnbindDirectoryRequest {
  deviceId?: string(name='DeviceId', description='This parameter is required.', example='34871************3380-cn-qingdao'),
  directoryId?: string(name='DirectoryId', description='This parameter is required.', example='3998**************9488-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model UnbindDirectoryResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model UnbindDirectoryResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnbindDirectoryResponseBody(name='body'),
}

/**
 * @param request UnbindDirectoryRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UnbindDirectoryResponse
 */
async function unbindDirectoryWithOptions(request: UnbindDirectoryRequest, runtime: $RuntimeOptions): UnbindDirectoryResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.deviceId)) {
    query['DeviceId'] = request.deviceId;
  }
  if (!$isNull(request.directoryId)) {
    query['DirectoryId'] = request.directoryId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UnbindDirectory',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request UnbindDirectoryRequest
 * @return UnbindDirectoryResponse
 */
async function unbindDirectory(request: UnbindDirectoryRequest): UnbindDirectoryResponse {
  var runtime = new $RuntimeOptions{};
  return unbindDirectoryWithOptions(request, runtime);
}

model UnbindParentPlatformDeviceRequest {
  deviceId?: string(name='DeviceId', description='This parameter is required.', example='348*****380-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
  parentPlatformId?: string(name='ParentPlatformId', description='This parameter is required.', example='361*****212-cn-qingdao'),
}

model UnbindParentPlatformDeviceResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model UnbindParentPlatformDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnbindParentPlatformDeviceResponseBody(name='body'),
}

/**
 * @param request UnbindParentPlatformDeviceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UnbindParentPlatformDeviceResponse
 */
async function unbindParentPlatformDeviceWithOptions(request: UnbindParentPlatformDeviceRequest, runtime: $RuntimeOptions): UnbindParentPlatformDeviceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.deviceId)) {
    query['DeviceId'] = request.deviceId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.parentPlatformId)) {
    query['ParentPlatformId'] = request.parentPlatformId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UnbindParentPlatformDevice',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request UnbindParentPlatformDeviceRequest
 * @return UnbindParentPlatformDeviceResponse
 */
async function unbindParentPlatformDevice(request: UnbindParentPlatformDeviceRequest): UnbindParentPlatformDeviceResponse {
  var runtime = new $RuntimeOptions{};
  return unbindParentPlatformDeviceWithOptions(request, runtime);
}

model UnbindPurchasedDeviceRequest {
  deviceId?: string(name='DeviceId', description='This parameter is required.', example='3939*****6580539-cn-qingdao'),
  ownerId?: long(name='OwnerId'),
}

model UnbindPurchasedDeviceResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model UnbindPurchasedDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnbindPurchasedDeviceResponseBody(name='body'),
}

/**
 * @param request UnbindPurchasedDeviceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UnbindPurchasedDeviceResponse
 */
async function unbindPurchasedDeviceWithOptions(request: UnbindPurchasedDeviceRequest, runtime: $RuntimeOptions): UnbindPurchasedDeviceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.deviceId)) {
    query['DeviceId'] = request.deviceId;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UnbindPurchasedDevice',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request UnbindPurchasedDeviceRequest
 * @return UnbindPurchasedDeviceResponse
 */
async function unbindPurchasedDevice(request: UnbindPurchasedDeviceRequest): UnbindPurchasedDeviceResponse {
  var runtime = new $RuntimeOptions{};
  return unbindPurchasedDeviceWithOptions(request, runtime);
}

model UnbindTemplateRequest {
  instanceId?: string(name='InstanceId', description='This parameter is required.', example='323*****994-cn-qingdao'),
  instanceType?: string(name='InstanceType', description='This parameter is required.', example='group'),
  ownerId?: long(name='OwnerId'),
  templateId?: string(name='TemplateId', example='323*****998-cn-qingdao'),
  templateType?: string(name='TemplateType', example='record'),
}

model UnbindTemplateResponseBody = {
  instanceId?: string(name='InstanceId', example='323*****994-cn-qingdao'),
  instanceType?: string(name='InstanceType', example='group'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
  templateId?: string(name='TemplateId', example='323*****998-cn-qingdao'),
  templateType?: string(name='TemplateType', example='record'),
}

model UnbindTemplateResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnbindTemplateResponseBody(name='body'),
}

/**
 * @param request UnbindTemplateRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UnbindTemplateResponse
 */
async function unbindTemplateWithOptions(request: UnbindTemplateRequest, runtime: $RuntimeOptions): UnbindTemplateResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.instanceId)) {
    query['InstanceId'] = request.instanceId;
  }
  if (!$isNull(request.instanceType)) {
    query['InstanceType'] = request.instanceType;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.templateId)) {
    query['TemplateId'] = request.templateId;
  }
  if (!$isNull(request.templateType)) {
    query['TemplateType'] = request.templateType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UnbindTemplate',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request UnbindTemplateRequest
 * @return UnbindTemplateResponse
 */
async function unbindTemplate(request: UnbindTemplateRequest): UnbindTemplateResponse {
  var runtime = new $RuntimeOptions{};
  return unbindTemplateWithOptions(request, runtime);
}

model UninstallCloudAppRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='cap-b06b26edfhytbn b94a75ae1a79efc90eb'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model UninstallCloudAppResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model UninstallCloudAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UninstallCloudAppResponseBody(name='body'),
}

/**
 * @summary 卸载云应用
 *
 * @param request UninstallCloudAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UninstallCloudAppResponse
 */
async function uninstallCloudAppWithOptions(request: UninstallCloudAppRequest, runtime: $RuntimeOptions): UninstallCloudAppResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UninstallCloudApp',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 卸载云应用
 *
 * @param request UninstallCloudAppRequest
 * @return UninstallCloudAppResponse
 */
async function uninstallCloudApp(request: UninstallCloudAppRequest): UninstallCloudAppResponse {
  var runtime = new $RuntimeOptions{};
  return uninstallCloudAppWithOptions(request, runtime);
}

model UnlockDeviceRequest {
  id?: string(name='Id', description='This parameter is required.', example='323884****9092996'),
  ownerId?: long(name='OwnerId'),
}

model UnlockDeviceResponseBody = {
  id?: string(name='Id', example='323884****9092996'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model UnlockDeviceResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UnlockDeviceResponseBody(name='body'),
}

/**
 * @param request UnlockDeviceRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UnlockDeviceResponse
 */
async function unlockDeviceWithOptions(request: UnlockDeviceRequest, runtime: $RuntimeOptions): UnlockDeviceResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.id)) {
    query['Id'] = request.id;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UnlockDevice',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request UnlockDeviceRequest
 * @return UnlockDeviceResponse
 */
async function unlockDevice(request: UnlockDeviceRequest): UnlockDeviceResponse {
  var runtime = new $RuntimeOptions{};
  return unlockDeviceWithOptions(request, runtime);
}

model UpdateCloudAppInfoRequest {
  appId?: string(name='AppId', description='This parameter is required.', example='cap-b06b26edfhytbn b94a75ae1a79efc90eb'),
  description?: string(name='Description', description='This parameter is required.'),
}

model UpdateCloudAppInfoResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model UpdateCloudAppInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateCloudAppInfoResponseBody(name='body'),
}

/**
 * @summary 更新云应用信息
 *
 * @param request UpdateCloudAppInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateCloudAppInfoResponse
 */
async function updateCloudAppInfoWithOptions(request: UpdateCloudAppInfoRequest, runtime: $RuntimeOptions): UpdateCloudAppInfoResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appId)) {
    query['AppId'] = request.appId;
  }
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateCloudAppInfo',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 更新云应用信息
 *
 * @param request UpdateCloudAppInfoRequest
 * @return UpdateCloudAppInfoResponse
 */
async function updateCloudAppInfo(request: UpdateCloudAppInfoRequest): UpdateCloudAppInfoResponse {
  var runtime = new $RuntimeOptions{};
  return updateCloudAppInfoWithOptions(request, runtime);
}

model UpdateFileInfoRequest {
  description?: string(name='Description', description='This parameter is required.'),
  fileId?: string(name='FileId', description='This parameter is required.', example='f-16713accddtgtj6340jgnclhwsg1813f718db2f7'),
}

model UpdateFileInfoResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model UpdateFileInfoResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateFileInfoResponseBody(name='body'),
}

/**
 * @summary 更新文件信息。
 *
 * @param request UpdateFileInfoRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateFileInfoResponse
 */
async function updateFileInfoWithOptions(request: UpdateFileInfoRequest, runtime: $RuntimeOptions): UpdateFileInfoResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.fileId)) {
    query['FileId'] = request.fileId;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateFileInfo',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 更新文件信息。
 *
 * @param request UpdateFileInfoRequest
 * @return UpdateFileInfoResponse
 */
async function updateFileInfo(request: UpdateFileInfoRequest): UpdateFileInfoResponse {
  var runtime = new $RuntimeOptions{};
  return updateFileInfoWithOptions(request, runtime);
}

model UpdateRenderingInstanceConfigurationRequest {
  configuration?: [ 
    {
      attributes?: [ 
        {
          name?: string(name='Name', description='This parameter is required.', example='lon'),
          value?: any(name='Value', description='This parameter is required.', example='100'),
        }
      ](name='Attributes', description='This parameter is required.'),
      moduleName?: string(name='ModuleName', description='This parameter is required.', example='location'),
    }
  ](name='Configuration', description='This parameter is required.'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model UpdateRenderingInstanceConfigurationShrinkRequest {
  configurationShrink?: string(name='Configuration', description='This parameter is required.'),
  renderingInstanceId?: string(name='RenderingInstanceId', description='This parameter is required.', example='render-9f8c57355d224ad7beaf95e145f22111'),
}

model UpdateRenderingInstanceConfigurationResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model UpdateRenderingInstanceConfigurationResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateRenderingInstanceConfigurationResponseBody(name='body'),
}

/**
 * @summary 更新云渲染实例配置参数
 *
 * @param tmpReq UpdateRenderingInstanceConfigurationRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateRenderingInstanceConfigurationResponse
 */
async function updateRenderingInstanceConfigurationWithOptions(tmpReq: UpdateRenderingInstanceConfigurationRequest, runtime: $RuntimeOptions): UpdateRenderingInstanceConfigurationResponse {
  tmpReq.validate();
  var request = new UpdateRenderingInstanceConfigurationShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.configuration)) {
    request.configurationShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.configuration, 'Configuration', 'json');
  }
  var query = {};
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  var body : map[string]any = {};
  if (!$isNull(request.configurationShrink)) {
    body['Configuration'] = request.configurationShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
    body = OpenApiUtil.parseToMap(body),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateRenderingInstanceConfiguration',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 更新云渲染实例配置参数
 *
 * @param request UpdateRenderingInstanceConfigurationRequest
 * @return UpdateRenderingInstanceConfigurationResponse
 */
async function updateRenderingInstanceConfiguration(request: UpdateRenderingInstanceConfigurationRequest): UpdateRenderingInstanceConfigurationResponse {
  var runtime = new $RuntimeOptions{};
  return updateRenderingInstanceConfigurationWithOptions(request, runtime);
}

model UpdateRenderingInstanceSettingsRequest {
  renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
  settings?: [ 
    {
      attributeName?: string(name='AttributeName', example='navbar.hide'),
      attributeValue?: string(name='AttributeValue', example='1'),
    }
  ](name='Settings'),
}

model UpdateRenderingInstanceSettingsShrinkRequest {
  renderingInstanceId?: string(name='RenderingInstanceId', example='render-9f8c57355d224ad7beaf95e145f22111'),
  settingsShrink?: string(name='Settings'),
}

model UpdateRenderingInstanceSettingsResponseBody = {
  requestId?: string(name='RequestId', description='Id of the request', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model UpdateRenderingInstanceSettingsResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateRenderingInstanceSettingsResponseBody(name='body'),
}

/**
 * @summary 更新实例设置
 *
 * @param tmpReq UpdateRenderingInstanceSettingsRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateRenderingInstanceSettingsResponse
 */
async function updateRenderingInstanceSettingsWithOptions(tmpReq: UpdateRenderingInstanceSettingsRequest, runtime: $RuntimeOptions): UpdateRenderingInstanceSettingsResponse {
  tmpReq.validate();
  var request = new UpdateRenderingInstanceSettingsShrinkRequest{};
  OpenApiUtil.convert(tmpReq, request);
  if (!$isNull(tmpReq.settings)) {
    request.settingsShrink = OpenApiUtil.arrayToStringWithSpecifiedStyle(tmpReq.settings, 'Settings', 'json');
  }
  var query = {};
  if (!$isNull(request.renderingInstanceId)) {
    query['RenderingInstanceId'] = request.renderingInstanceId;
  }
  if (!$isNull(request.settingsShrink)) {
    query['Settings'] = request.settingsShrink;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateRenderingInstanceSettings',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 更新实例设置
 *
 * @param request UpdateRenderingInstanceSettingsRequest
 * @return UpdateRenderingInstanceSettingsResponse
 */
async function updateRenderingInstanceSettings(request: UpdateRenderingInstanceSettingsRequest): UpdateRenderingInstanceSettingsResponse {
  var runtime = new $RuntimeOptions{};
  return updateRenderingInstanceSettingsWithOptions(request, runtime);
}

model UpdateVsPullStreamInfoConfigRequest {
  always?: string(name='Always'),
  appName?: string(name='AppName', description='This parameter is required.', example='xxxApp'),
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.aliyundoc.com'),
  endTime?: string(name='EndTime', example='2018-12-10T18:00:00Z'),
  ownerId?: long(name='OwnerId'),
  sourceUrl?: string(name='SourceUrl', description='This parameter is required.', example='up.xxx.com.cn'),
  startTime?: string(name='StartTime', example='2021-12-10T10:00:00Z'),
  streamName?: string(name='StreamName', description='This parameter is required.', example='xxxStream'),
}

model UpdateVsPullStreamInfoConfigResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model UpdateVsPullStreamInfoConfigResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UpdateVsPullStreamInfoConfigResponseBody(name='body'),
}

/**
 * @param request UpdateVsPullStreamInfoConfigRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UpdateVsPullStreamInfoConfigResponse
 */
async function updateVsPullStreamInfoConfigWithOptions(request: UpdateVsPullStreamInfoConfigRequest, runtime: $RuntimeOptions): UpdateVsPullStreamInfoConfigResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.always)) {
    query['Always'] = request.always;
  }
  if (!$isNull(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.endTime)) {
    query['EndTime'] = request.endTime;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.sourceUrl)) {
    query['SourceUrl'] = request.sourceUrl;
  }
  if (!$isNull(request.startTime)) {
    query['StartTime'] = request.startTime;
  }
  if (!$isNull(request.streamName)) {
    query['StreamName'] = request.streamName;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UpdateVsPullStreamInfoConfig',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request UpdateVsPullStreamInfoConfigRequest
 * @return UpdateVsPullStreamInfoConfigResponse
 */
async function updateVsPullStreamInfoConfig(request: UpdateVsPullStreamInfoConfigRequest): UpdateVsPullStreamInfoConfigResponse {
  var runtime = new $RuntimeOptions{};
  return updateVsPullStreamInfoConfigWithOptions(request, runtime);
}

model UploadCloudAppRequest {
  appName?: string(name='AppName', description='This parameter is required.', example='com.aaa.bbb'),
  appVersion?: string(name='AppVersion', description='This parameter is required.', example='1.1.1'),
  description?: string(name='Description'),
  downloadUrl?: string(name='DownloadUrl', description='This parameter is required.', example='https://xxx.xxx.xxx.apk'),
  md5?: string(name='Md5', description='This parameter is required.', example='0CFBB7BD10CDD7279642ADAB8FEF3DEE'),
}

model UploadCloudAppResponseBody = {
  appId?: string(name='AppId', example='cap-b06b26edfhytbn b94a75ae1a79efc90eb'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model UploadCloudAppResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UploadCloudAppResponseBody(name='body'),
}

/**
 * @summary 应用上架
 *
 * @param request UploadCloudAppRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UploadCloudAppResponse
 */
async function uploadCloudAppWithOptions(request: UploadCloudAppRequest, runtime: $RuntimeOptions): UploadCloudAppResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.appName)) {
    query['AppName'] = request.appName;
  }
  if (!$isNull(request.appVersion)) {
    query['AppVersion'] = request.appVersion;
  }
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.downloadUrl)) {
    query['DownloadUrl'] = request.downloadUrl;
  }
  if (!$isNull(request.md5)) {
    query['Md5'] = request.md5;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UploadCloudApp',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 应用上架
 *
 * @param request UploadCloudAppRequest
 * @return UploadCloudAppResponse
 */
async function uploadCloudApp(request: UploadCloudAppRequest): UploadCloudAppResponse {
  var runtime = new $RuntimeOptions{};
  return uploadCloudAppWithOptions(request, runtime);
}

model UploadFileRequest {
  description?: string(name='Description'),
  fileName?: string(name='FileName', description='This parameter is required.', example='mytest'),
  md5?: string(name='Md5', description='This parameter is required.', example='150b6083f50dd08159d45a0d5e4b56f9'),
  originUrl?: string(name='OriginUrl', description='This parameter is required.', example='https://xxx.xxx.xxx.tar'),
  targetPath?: string(name='TargetPath', description='This parameter is required.', example='/data/tmp/test/xxx.tar'),
}

model UploadFileResponseBody = {
  fileId?: string(name='FileId', example='f-1671330gr7934d4771813f7141d28db2f7'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model UploadFileResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UploadFileResponseBody(name='body'),
}

/**
 * @summary 文件上传
 *
 * @param request UploadFileRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UploadFileResponse
 */
async function uploadFileWithOptions(request: UploadFileRequest, runtime: $RuntimeOptions): UploadFileResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.fileName)) {
    query['FileName'] = request.fileName;
  }
  if (!$isNull(request.md5)) {
    query['Md5'] = request.md5;
  }
  if (!$isNull(request.originUrl)) {
    query['OriginUrl'] = request.originUrl;
  }
  if (!$isNull(request.targetPath)) {
    query['TargetPath'] = request.targetPath;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UploadFile',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 文件上传
 *
 * @param request UploadFileRequest
 * @return UploadFileResponse
 */
async function uploadFile(request: UploadFileRequest): UploadFileResponse {
  var runtime = new $RuntimeOptions{};
  return uploadFileWithOptions(request, runtime);
}

model UploadPublicKeyRequest {
  content?: string(name='Content', description='This parameter is required.', example='verify_dffeb6610035dcb77b413a59c3*****'),
  description?: string(name='Description'),
  keyGroup?: string(name='KeyGroup', example='g-test'),
  keyName?: string(name='KeyName', description='This parameter is required.', example='mykey-v1.0'),
  keyType?: string(name='KeyType'),
}

model UploadPublicKeyResponseBody = {
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model UploadPublicKeyResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: UploadPublicKeyResponseBody(name='body'),
}

/**
 * @summary 上传公钥，用于安全登陆鉴权。
 *
 * @param request UploadPublicKeyRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return UploadPublicKeyResponse
 */
async function uploadPublicKeyWithOptions(request: UploadPublicKeyRequest, runtime: $RuntimeOptions): UploadPublicKeyResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.content)) {
    query['Content'] = request.content;
  }
  if (!$isNull(request.description)) {
    query['Description'] = request.description;
  }
  if (!$isNull(request.keyGroup)) {
    query['KeyGroup'] = request.keyGroup;
  }
  if (!$isNull(request.keyName)) {
    query['KeyName'] = request.keyName;
  }
  if (!$isNull(request.keyType)) {
    query['KeyType'] = request.keyType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'UploadPublicKey',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @summary 上传公钥，用于安全登陆鉴权。
 *
 * @param request UploadPublicKeyRequest
 * @return UploadPublicKeyResponse
 */
async function uploadPublicKey(request: UploadPublicKeyRequest): UploadPublicKeyResponse {
  var runtime = new $RuntimeOptions{};
  return uploadPublicKeyWithOptions(request, runtime);
}

model VerifyVsDomainOwnerRequest {
  domainName?: string(name='DomainName', description='This parameter is required.', example='example.aliyundoc.com'),
  ownerId?: long(name='OwnerId'),
  verifyType?: string(name='VerifyType', description='This parameter is required.', example='dnsCheck'),
}

model VerifyVsDomainOwnerResponseBody = {
  content?: string(name='Content', example='verify_dffeb6610035dcb77b413a59c32c****'),
  requestId?: string(name='RequestId', example='BEA5625F-8FCF-48F4-851B-CA63946DA664'),
}

model VerifyVsDomainOwnerResponse = {
  headers?: map[string]string(name='headers'),
  statusCode?: int32(name='statusCode'),
  body?: VerifyVsDomainOwnerResponseBody(name='body'),
}

/**
 * @param request VerifyVsDomainOwnerRequest
 * @param runtime runtime options for this request RuntimeOptions
 * @return VerifyVsDomainOwnerResponse
 */
async function verifyVsDomainOwnerWithOptions(request: VerifyVsDomainOwnerRequest, runtime: $RuntimeOptions): VerifyVsDomainOwnerResponse {
  request.validate();
  var query = {};
  if (!$isNull(request.domainName)) {
    query['DomainName'] = request.domainName;
  }
  if (!$isNull(request.ownerId)) {
    query['OwnerId'] = request.ownerId;
  }
  if (!$isNull(request.verifyType)) {
    query['VerifyType'] = request.verifyType;
  }
  var req = new OpenApiUtil.OpenApiRequest{ 
    query = OpenApiUtil.query(query),
  };
  var params = new OpenApiUtil.Params{
    action = 'VerifyVsDomainOwner',
    version = '2018-12-12',
    protocol = 'HTTPS',
    pathname = '/',
    method = 'POST',
    authType = 'AK',
    style = 'RPC',
    reqBodyType = 'formData',
    bodyType = 'json',
  };
  if ($isNull(@signatureVersion) || @signatureVersion != 'v4') {
    return callApi(params, req, runtime);
  } else {
    return execute(params, req, runtime);
  }
}

/**
 * @param request VerifyVsDomainOwnerRequest
 * @return VerifyVsDomainOwnerResponse
 */
async function verifyVsDomainOwner(request: VerifyVsDomainOwnerRequest): VerifyVsDomainOwnerResponse {
  var runtime = new $RuntimeOptions{};
  return verifyVsDomainOwnerWithOptions(request, runtime);
}

